@@ -15,7 +15,6 @@ The same docker image can run on AWS Lambda, Amazon EC2, AWS Fargate, and local
1515- Supports Amazon API Gateway Rest API and Http API endpoints, Lambda Function URLs, and Application Load Balancer
1616- Supports Lambda managed runtimes, custom runtimes and docker OCI images
1717- Supports Lambda Managed Instances for multi-concurrent request handling
18- - Supports Lambda SnapStart with before-checkpoint and after-restore hooks
1918- Supports any web frameworks and languages, no new code dependency to include
2019- Automatic encode binary response
2120- Enables graceful shutdown
@@ -67,8 +66,6 @@ The readiness check port/path and traffic port can be configured using environme
6766| AWS_LWA_AUTHORIZATION_SOURCE | a header name to be replaced to ` Authorization ` | None |
6867| AWS_LWA_ERROR_STATUS_CODES | HTTP status codes that will cause Lambda invocations to fail (e.g. "500,502-504") | None |
6968| AWS_LWA_LAMBDA_RUNTIME_API_PROXY | overwrites ` AWS_LAMBDA_RUNTIME_API ` to allow proxying request | None |
70- | AWS_LWA_SNAPSTART_BEFORE_CHECKPOINT_PATH | inner-app path the adapter POSTs to before a SnapStart snapshot (drain resources) | None |
71- | AWS_LWA_SNAPSTART_AFTER_RESTORE_PATH | inner-app path the adapter POSTs to after a SnapStart restore (reconnect/reseed) | None |
7269
7370> ** Deprecation Notice:** The following non-namespaced environment variables are deprecated and will be removed in version 2.0:
7471> ` HOST ` , ` READINESS_CHECK_PORT ` , ` READINESS_CHECK_PATH ` , ` READINESS_CHECK_PROTOCOL ` , ` REMOVE_BASE_PATH ` , ` ASYNC_INIT ` .
@@ -78,36 +75,6 @@ The readiness check port/path and traffic port can be configured using environme
7875
7976👉 [ Detailed configuration docs] ( https://aws.github.io/aws-lambda-web-adapter/configuration/environment-variables.html )
8077
81- ### SnapStart support
82-
83- When your function uses [ Lambda SnapStart] ( https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html ) ,
84- the adapter can notify your web application at the snapshot boundary so it can
85- drain and re-establish state (database connections, cached DNS, PRNG seeds,
86- unique identifiers). Both hooks are opt-in and independent.
87-
88- | Variable | When the adapter calls it | Use it to |
89- | ---| ---| ---|
90- | ` AWS_LWA_SNAPSTART_BEFORE_CHECKPOINT_PATH ` | Before the snapshot is taken | Drain/close resources that won't survive the snapshot |
91- | ` AWS_LWA_SNAPSTART_AFTER_RESTORE_PATH ` | After restore, before serving traffic | Reconnect, refresh credentials, reseed randomness, regenerate unique IDs |
92-
93- Each hook is an empty ` POST ` ; your application must respond with a ` 2xx ` status.
94- A non-` 2xx ` response, a connection failure, or taking longer than 60 seconds to
95- respond fails the SnapStart phase (initialization for the before-checkpoint hook,
96- restore for the after-restore hook) instead of serving traffic against an
97- improperly prepared application.
98-
99- After restore, the adapter also automatically refreshes its own HTTP connection
100- to your application, so it never reuses a connection captured in the snapshot, and
101- then re-runs the readiness check before admitting traffic. If the application does
102- not report ready within 10 seconds of restore, the restore fails.
103-
104- > These hook paths are control-plane operations. External requests (via API
105- > Gateway or ALB) that target a configured hook path receive ` 403 Forbidden ` and
106- > are never forwarded to your application, so choose paths your normal traffic
107- > does not use.
108-
109- See the [ FastAPI with SnapStart example] ( examples/fastapi-snapstart-zip ) for a complete, deployable application.
110-
11178## Examples
11279
11380- [ FastAPI] ( examples/fastapi )
@@ -117,8 +84,6 @@ See the [FastAPI with SnapStart example](examples/fastapi-snapstart-zip) for a c
11784- [ FastAPI with Response Streaming in Zip] ( examples/fastapi-response-streaming-zip )
11885- [ FastAPI with Response Streaming on Lambda Managed Instances] ( examples/fastapi-response-streaming-lmi )
11986- [ FastAPI Response Streaming Backend with IAM Auth] ( examples/fastapi-backend-only-response-streaming/ )
120- - [ FastAPI with SnapStart] ( examples/fastapi-snapstart )
121- - [ FastAPI with SnapStart in Zip] ( examples/fastapi-snapstart-zip )
12287- [ Flask] ( examples/flask )
12388- [ Flask in Zip] ( examples/flask-zip )
12489- [ Serverless Django] ( https://github.com/aws-hebrew-book/serverless-django ) by [ @efi-mk ] ( https://github.com/efi-mk )
0 commit comments