Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
## v1.1.0 - 2026-07-09

### Features

- Add SnapStart support. The adapter notifies your web application at the SnapStart
boundary via two opt-in HTTP hooks — `AWS_LWA_SNAPSTART_BEFORE_CHECKPOINT_PATH`
(before checkpoint) and `AWS_LWA_SNAPSTART_AFTER_RESTORE_PATH` (after restore) —
so it can drain and re-establish connections. Each hook call is bounded by a
60-second timeout. After restore the adapter refreshes its own HTTP client and
re-runs the readiness check (bounded by 10 seconds) before admitting traffic, and
it rejects external traffic to the hook paths with 403.

---

## v1.0.1 - 2026-05-28

### Bug Fixes
Expand Down
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lambda_web_adapter"
version = "1.1.0"
version = "1.0.1"
authors = [
"Harold Sun <sunhua@amazon.com>",
"David Calavera <dcalaver@amazon.com>",
Expand All @@ -23,7 +23,7 @@ http-body = "1.0.1"
http-body-util = "0.1.0"
hyper = { version = "1.5.2", features = ["client"] }
hyper-util = "0.1.10"
lambda_http = { version = "1.3.0", default-features = false, features = [
lambda_http = { version = "1.1.1", default-features = false, features = [
"apigw_http",
"apigw_rest",
"alb",
Expand Down
35 changes: 0 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ The same docker image can run on AWS Lambda, Amazon EC2, AWS Fargate, and local
- Supports Amazon API Gateway Rest API and Http API endpoints, Lambda Function URLs, and Application Load Balancer
- Supports Lambda managed runtimes, custom runtimes and docker OCI images
- Supports Lambda Managed Instances for multi-concurrent request handling
- Supports Lambda SnapStart with before-checkpoint and after-restore hooks
- Supports any web frameworks and languages, no new code dependency to include
- Automatic encode binary response
- Enables graceful shutdown
Expand Down Expand Up @@ -67,8 +66,6 @@ The readiness check port/path and traffic port can be configured using environme
| AWS_LWA_AUTHORIZATION_SOURCE | a header name to be replaced to `Authorization` | None |
| AWS_LWA_ERROR_STATUS_CODES | HTTP status codes that will cause Lambda invocations to fail (e.g. "500,502-504") | None |
| AWS_LWA_LAMBDA_RUNTIME_API_PROXY | overwrites `AWS_LAMBDA_RUNTIME_API` to allow proxying request | None |
| AWS_LWA_SNAPSTART_BEFORE_CHECKPOINT_PATH | inner-app path the adapter POSTs to before a SnapStart snapshot (drain resources) | None |
| AWS_LWA_SNAPSTART_AFTER_RESTORE_PATH | inner-app path the adapter POSTs to after a SnapStart restore (reconnect/reseed) | None |

> **Deprecation Notice:** The following non-namespaced environment variables are deprecated and will be removed in version 2.0:
> `HOST`, `READINESS_CHECK_PORT`, `READINESS_CHECK_PATH`, `READINESS_CHECK_PROTOCOL`, `REMOVE_BASE_PATH`, `ASYNC_INIT`.
Expand All @@ -78,36 +75,6 @@ The readiness check port/path and traffic port can be configured using environme

👉 [Detailed configuration docs](https://aws.github.io/aws-lambda-web-adapter/configuration/environment-variables.html)

### SnapStart support

When your function uses [Lambda SnapStart](https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html),
the adapter can notify your web application at the snapshot boundary so it can
drain and re-establish state (database connections, cached DNS, PRNG seeds,
unique identifiers). Both hooks are opt-in and independent.

| Variable | When the adapter calls it | Use it to |
|---|---|---|
| `AWS_LWA_SNAPSTART_BEFORE_CHECKPOINT_PATH` | Before the snapshot is taken | Drain/close resources that won't survive the snapshot |
| `AWS_LWA_SNAPSTART_AFTER_RESTORE_PATH` | After restore, before serving traffic | Reconnect, refresh credentials, reseed randomness, regenerate unique IDs |

Each hook is an empty `POST`; your application must respond with a `2xx` status.
A non-`2xx` response, a connection failure, or taking longer than 60 seconds to
respond fails the SnapStart phase (initialization for the before-checkpoint hook,
restore for the after-restore hook) instead of serving traffic against an
improperly prepared application.

After restore, the adapter also automatically refreshes its own HTTP connection
to your application, so it never reuses a connection captured in the snapshot, and
then re-runs the readiness check before admitting traffic. If the application does
not report ready within 10 seconds of restore, the restore fails.

> These hook paths are control-plane operations. External requests (via API
> Gateway or ALB) that target a configured hook path receive `403 Forbidden` and
> are never forwarded to your application, so choose paths your normal traffic
> does not use.

See the [FastAPI with SnapStart example](examples/fastapi-snapstart-zip) for a complete, deployable application.

## Examples

- [FastAPI](examples/fastapi)
Expand All @@ -117,8 +84,6 @@ See the [FastAPI with SnapStart example](examples/fastapi-snapstart-zip) for a c
- [FastAPI with Response Streaming in Zip](examples/fastapi-response-streaming-zip)
- [FastAPI with Response Streaming on Lambda Managed Instances](examples/fastapi-response-streaming-lmi)
- [FastAPI Response Streaming Backend with IAM Auth](examples/fastapi-backend-only-response-streaming/)
- [FastAPI with SnapStart](examples/fastapi-snapstart)
- [FastAPI with SnapStart in Zip](examples/fastapi-snapstart-zip)
- [Flask](examples/flask)
- [Flask in Zip](examples/flask-zip)
- [Serverless Django](https://github.com/aws-hebrew-book/serverless-django) by [@efi-mk](https://github.com/efi-mk)
Expand Down
1 change: 0 additions & 1 deletion docs/guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
- [Non-HTTP Event Triggers](./features/non-http-events.md)
- [Multi-Tenancy](./features/multi-tenancy.md)
- [Lambda Managed Instances](./features/managed-instances.md)
- [SnapStart](./features/snapstart.md)
- [Graceful Shutdown](./features/graceful-shutdown.md)
- [Base Path Removal](./features/base-path-removal.md)
- [Authorization Header](./features/authorization-header.md)
Expand Down
2 changes: 0 additions & 2 deletions docs/guide/src/configuration/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ All configuration is done through environment variables, set either in your Dock
| `AWS_LWA_AUTHORIZATION_SOURCE` | Header name to replace with `Authorization` | None |
| `AWS_LWA_ERROR_STATUS_CODES` | HTTP status codes that cause Lambda invocation failure (e.g. `500,502-504`) | None |
| `AWS_LWA_LAMBDA_RUNTIME_API_PROXY` | Proxy URL for Lambda Runtime API requests | None |
| `AWS_LWA_SNAPSTART_BEFORE_CHECKPOINT_PATH` | Inner-app path the adapter POSTs to before a SnapStart snapshot | None |
| `AWS_LWA_SNAPSTART_AFTER_RESTORE_PATH` | Inner-app path the adapter POSTs to after a SnapStart restore | None |

## Deprecated Variables

Expand Down
2 changes: 0 additions & 2 deletions docs/guide/src/examples/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ The repository includes working examples for many popular web frameworks, packag
|---------|-----------|-----------|
| [FastAPI](https://github.com/aws/aws-lambda-web-adapter/tree/main/examples/fastapi) | Docker | No |
| [FastAPI in Zip](https://github.com/aws/aws-lambda-web-adapter/tree/main/examples/fastapi-zip) | Zip | No |
| [FastAPI SnapStart](https://github.com/aws/aws-lambda-web-adapter/tree/main/examples/fastapi-snapstart) | Docker | No |
| [FastAPI SnapStart Zip](https://github.com/aws/aws-lambda-web-adapter/tree/main/examples/fastapi-snapstart-zip) | Zip | No |
| [FastAPI Background Tasks](https://github.com/aws/aws-lambda-web-adapter/tree/main/examples/fastapi-background-tasks) | Docker | No |
| [FastAPI Response Streaming](https://github.com/aws/aws-lambda-web-adapter/tree/main/examples/fastapi-response-streaming) | Docker | Yes |
| [FastAPI Response Streaming Zip](https://github.com/aws/aws-lambda-web-adapter/tree/main/examples/fastapi-response-streaming-zip) | Zip | Yes |
Expand Down
66 changes: 0 additions & 66 deletions docs/guide/src/features/snapstart.md

This file was deleted.

Loading
Loading