Releases: aws-powertools/powertools-lambda-python
v3.29.0
Summary
We're thrilled to announce native async resolution for the Event Handler. Write async def route handlers, call await app.resolve_async(event, context), and mix sync/async middlewares. Everything runs natively on the event loop.
We also fixed OpenAPI schema generation for Pydantic @computed_field, a deadlock when sync middlewares raised before calling next(), and ALB returning 422 when response body is None.
A huge thanks to @hirenkumar-n-dholariya, @amrabed, and @catarinacps for their contributions!
Async Event Handler with resolve_async()
You can now define async route handlers and resolve them without blocking the event loop.
Even though the Lambda handler itself is sync, you can use asyncio.run(app.resolve_async(event, context)) to fan out multiple I/O calls concurrently with asyncio.gather or call async libraries directly.
import asyncio
from aws_lambda_powertools.event_handler import APIGatewayHttpResolver
from aws_lambda_powertools.utilities.typing import LambdaContext
app = APIGatewayHttpResolver()
async def get_orders(user_id: str) -> list:
...
async def get_profile(user_id: str) -> dict:
...
@app.get("/dashboard/<user_id>")
async def get_dashboard(user_id: str):
orders, profile = await asyncio.gather(
get_orders(user_id),
get_profile(user_id),
)
return {"orders": orders, "profile": profile}
def lambda_handler(event: dict, context: LambdaContext):
return asyncio.run(app.resolve_async(event, context))Sync and async middlewares work together seamlessly. Sync middlewares are bridged to the event loop in a background thread, so you don't need to rewrite existing middleware to adopt async handlers.
OpenAPI computed_field support
Pydantic @computed_field properties now appear in generated OpenAPI schemas. Previously they were excluded because we always used mode="validation" when generating JSON schemas.
from pydantic import BaseModel, computed_field
from aws_lambda_powertools.event_handler import APIGatewayHttpResolver
app = APIGatewayHttpResolver(enable_validation=True)
class Order(BaseModel):
price: float
quantity: int
@computed_field
@property
def total(self) -> float:
return self.price * self.quantity
@app.get("/order")
def get_order() -> Order:
return Order(price=10.0, quantity=3)Last but not least, thanks to @chriselion and @avplab for reporting bugs in our Event Handler resolvers.
Changes
- fix(event_handler): prevent deadlock when async middleware raises before calling next() (#8196) by @leandrodamascena
- fix(event_handler): fix ALB resolver returns when response body is None (#8194) by @leandrodamascena
- feat(openapi): add compute_field support (#8188) by @leandrodamascena
- fix(idempotency): resolve tech debt issues with falsy responses and Redis persistency (#8176) by @hirenkumar-n-dholariya
- fix(parser): type hints should reflect primitive types support (#8175) by @catarinacps
- feat(event_handler): adding resolve async internal (#8170) by @leandrodamascena
- feat: add AsyncMiddlewareFrame support (#8158) by @leandrodamascena
- feat(event-handler): add _registered_api_adapter_async() internal building block (#8157) by @hirenkumar-n-dholariya
- refactor(event_handler): extract async logic to a separated file (#8138) by @leandrodamascena
📜 Documentation updates
- feat(event_handler): adding resolve async public API (#8171) by @leandrodamascena
- chore(deps): bump gitpython from 3.1.44 to 3.1.47 in /docs (#8172) by @dependabot[bot]
- docs: add lambda templates content (#8159) by @amrabed
🔧 Maintenance
- chore: update aws-encryption-sdk allowed versions (#8191) by @leandrodamascena
- chore(deps): update requests requirement from >=2.32.0 to >=2.33.1 in /examples/event_handler_graphql/src (#8189) by @dependabot[bot]
- chore(deps): batch dependency updates (#8184) by @leandrodamascena
- chore(deps-dev): bump gitpython from 3.1.44 to 3.1.47 (#8173) by @dependabot[bot]
- chore(deps): bump gitpython from 3.1.44 to 3.1.47 in /docs (#8172) by @dependabot[bot]
- chore(deps): batch update dependencies (#8168) by @leandrodamascena
This release was made possible by the following contributors:
@amrabed, @catarinacps, @dependabot[bot], @github-actions[bot], @hirenkumar-n-dholariya, @leandrodamascena, dependabot[bot] and github-actions[bot]
v3.28.0
Summary
This release brings dependency injection, an enriched Request object, OpenAPI improvements, and internal refactoring to the Event Handler.
- Dependency injection: type-safe
Depends()with nested resolution, caching, and test overrides - Enriched Request:
resolved_eventandcontextproperties bridge middleware and dependencies - OpenAPI status_code: set default response status code on route decorators
- Query string fix: parameters no longer dropped when both single and multi-value query strings are present
A huge thanks to @JustinBerger, @Iamrodos, and @ran-isenberg for their contributions!
Dependency injection with Depends()
You can now use Depends() to declare typed dependencies directly in route handler signatures: no decorators, no global state. Dependencies are resolved automatically, cached per invocation, and support nested dependency trees.
import os
from typing import Any
import boto3
from typing_extensions import Annotated
from aws_lambda_powertools.event_handler import APIGatewayHttpResolver
from aws_lambda_powertools.event_handler.depends import Depends
from aws_lambda_powertools.utilities.typing import LambdaContext
app = APIGatewayHttpResolver()
def get_dynamodb_table():
dynamodb = boto3.resource("dynamodb")
return dynamodb.Table(os.environ["TABLE_NAME"])
@app.get("/orders")
def list_orders(table: Annotated[Any, Depends(get_dynamodb_table)]):
return table.scan()["Items"]For testing, swap any dependency without monkeypatching:
app.dependency_overrides[get_dynamodb_table] = lambda: mock_tableEnriched Request object
The Request object now exposes resolved_event and context, enabling dependency functions to access the full Powertools event and bridge data with middleware.
from typing_extensions import Annotated
from aws_lambda_powertools.event_handler import APIGatewayHttpResolver, Response
from aws_lambda_powertools.event_handler.depends import Depends
from aws_lambda_powertools.event_handler.request import Request
app = APIGatewayHttpResolver()
# Middleware handles auth: can return HTTP responses (redirects, 401s)
def auth_middleware(app, next_middleware):
token = app.current_event.headers.get("authorization", "")
if not token:
return Response(status_code=401, body="Unauthorized")
app.append_context(user={"id": "user-123", "role": "admin"})
return next_middleware(app)
app.use(middlewares=[auth_middleware])
# Depends() reads what middleware wrote via request.context
def get_current_user(request: Request) -> dict:
return request.context["user"]
@app.get("/admin/dashboard")
def admin_dashboard(user: Annotated[dict, Depends(get_current_user)]):
return {"message": f"Welcome {user['id']}", "role": user["role"]}OpenAPI status_code field
You can now set the default response status code directly on route decorators. This is reflected in the generated OpenAPI schema and Swagger UI.
from aws_lambda_powertools.event_handler import APIGatewayRestResolver
app = APIGatewayRestResolver(enable_validation=True)
@app.post(
"/todos",
summary="Creates a new todo item",
status_code=201,
tags=["Todos"],
)
def create_todo(title: str) -> dict:
return {"id": 1, "title": title}Changes
- fix(data_class): merge querystring parameters in ALB/APIGW classes (#8154) by @leandrodamascena
- fix(event_handler): read swagger files with UTF-8 encoding (#8131) by @JustinBerger
- refactor(event_handlers): remove unnecessary init methods (#8127) by @leandrodamascena
- refactor(event_handler): refactoring encoder file (#8126) by @leandrodamascena
- refactor(event_handler): refactoring proxy events (#8125) by @leandrodamascena
- refactor(event_handler): refactoring params to reduce code (#8124) by @leandrodamascena
- refactor(event_handler): extract OpenAPI schema generation from Route class (#8098) by @leandrodamascena
📜 Documentation updates
- feat(event_handler): enrich request object (#8153) by @leandrodamascena
- feat(event_handler): adding status_code OpenAPI field (#8130) by @leandrodamascena
- docs: adding new Lambda features (#7917) by @leandrodamascena
- feat(event_handler): add Dependency injection with Depends() (#8128) by @leandrodamascena
- docs: add openapi docs (#7939) by @leandrodamascena
🔧 Maintenance
- chore: bump dependabot dependencies. (#8152) by @leandrodamascena
- chore(deps-dev): bump aws-cdk from 2.1117.0 to 2.1118.0 in the aws-cdk group (#8142) by @dependabot[bot]
- chore(deps): bump cryptography from 46.0.6 to 46.0.7 (#8132) by @dependabot[bot]
- chore(deps-dev): bump testcontainers from 4.14.1 to 4.14.2 (#8116) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.46.0 to 1.48.1 (#8113) by @dependabot[bot]
- chore(deps-dev): bump types-python-dateutil from 2.9.0.20260305 to 2.9.0.20260402 (#8114) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1115.0 to 2.1117.0 in the aws-cdk group (#8111) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.42.74 to 1.42.84 (#8115) by @dependabot[bot]
- chore(deps-dev): bump types-protobuf from 6.32.1.20260221 to 7.34.1.20260403 (#8117) by @dependabot[bot]
This release was made possible by the following contributors:
@JustinBerger, @dependabot[bot], @github-actions[bot], @leandrodamascena, dependabot[bot] and github-actions[bot]
v3.27.0
Summary
In this release, we focused on the Event Handler utility - we added three new features and shipped several important bug fixes across Event Handler and Idempotency.
- File uploads - handle
multipart/form-datauploads with full OpenAPI validation and Swagger UI file picker - Cookie parameters - use cookies as typed, validated parameters alongside
Query(),Header(), andForm() - Request object - access the resolved route pattern, path parameters, and HTTP method in middleware and route handlers
A huge thanks to @oyiz-michael, @siwyd, @abhu85, and @danjhd for their contributions!
File upload support for OpenAPI
You can now handle file uploads in your API endpoints with full OpenAPI validation and Swagger UI support. If using Swagger, it renders a file picker automatically. A special thanks to @oyiz-michael for starting the initial work on this feature.
from typing import Annotated
from aws_lambda_powertools.event_handler import APIGatewayRestResolver
from aws_lambda_powertools.event_handler.openapi.params import File, Form, UploadFile
app = APIGatewayRestResolver(enable_validation=True)
app.enable_swagger(path="/swagger")
@app.post("/upload")
def upload(
file_data: Annotated[UploadFile, File(description="CSV file")],
separator: Annotated[str, Form(description="CSV separator")] = ",",
):
return {
"filename": file_data.filename,
"content_type": file_data.content_type,
"file_size": len(file_data),
}You can receive files as raw bytes (Annotated[bytes, File()]) or as an UploadFile object with filename and content type metadata.
Cookie parameter support for OpenAPI
You can now use cookies as typed, validated parameters in your API endpoints - just like Query(), Header(), or Form(). The OpenAPI schema generates in: cookie parameters automatically, and validation works across all resolver types.
from typing import Annotated
from aws_lambda_powertools.event_handler import APIGatewayRestResolver
from aws_lambda_powertools.event_handler.openapi.params import Cookie
app = APIGatewayRestResolver(enable_validation=True)
@app.get("/me")
def get_me(
session_id: Annotated[str, Cookie(description="Session identifier")],
theme: Annotated[str, Cookie(description="UI theme")] = "light",
):
return {"session_id": session_id, "theme": theme}Request object for middleware and route handlers
We added a Request object that gives middleware and route handlers access to the resolved route pattern, Powertools-extracted path parameters, HTTP method, headers, query parameters, and body. Previously, middleware only had access to app.current_event, which returns raw API Gateway parameters (e.g. {"proxy": "users/123"} for {proxy+} routes) instead of the resolved ones.
You can access the Request object in two ways:
In middleware via app.request:
from aws_lambda_powertools.event_handler import APIGatewayRestResolver, Response
from aws_lambda_powertools.event_handler.middlewares import NextMiddleware
app = APIGatewayRestResolver()
def auth_middleware(app: APIGatewayRestResolver, next_middleware: NextMiddleware) -> Response:
req = app.request
route = req.route # "/users/{user_id}"
path_params = req.path_parameters # {"user_id": "123"}
method = req.method # "GET"
# auth logic here...
return next_middleware(app)
app.use(middlewares=[auth_middleware])In route handlers via type annotation:
from aws_lambda_powertools.event_handler import APIGatewayRestResolver, Request
app = APIGatewayRestResolver()
@app.get("/users/<user_id>")
def get_user(user_id: str, request: Request):
user_agent = request.headers.get("user-agent")
return {"id": user_id, "route": request.route, "user_agent": user_agent}Changes
- feat(event_handler): add Cookie parameter support for OpenAPI utility (#8095) by @leandrodamascena
- fix(data_classes): support {proxy+} and path parameters in authorizer response (#8092) by @leandrodamascena
- fix(event_handler): sync middleware receives real response in async ASGI context (#8089) by @leandrodamascena
- feat(event_handler): add Request object for middleware access to resolved route and args (#8036) by @oyiz-michael
- fix(event_handler): support finding type annotated resolver when merging schemas (#8074) by @siwyd
- fix(idempotency): serialize Pydantic models with mode='json' for UUID/date support (#8075) by @abhu85
- fix(event_handler): normalize Union and RootModel sequences in body validation (#8067) by @danjhd
📜 Documentation updates
- ci: remove me-south-1 region (#8108) by @leandrodamascena
- docs: adding docs to Request object (#8105) by @leandrodamascena
- feat(event_handler): add File parameter support for multipart/form-data uploads (#8093) by @leandrodamascena
- docs: fix ranthebuilder link in Update we_made_this.md (#8084) by @ran-isenberg
- chore(deps): bump squidfunk/mkdocs-material from
8f41b60to868ad4din /docs (#8083) by @dependabot[bot] - chore(deps): bump requests from 2.32.4 to 2.33.0 in /docs (#8070) by @dependabot[bot]
- chore(deps): bump mkdocs-material from 9.7.1 to 9.7.5 (#8045) by @dependabot[bot]
🔧 Maintenance
- docs: adding docs to Request object (#8105) by @leandrodamascena
- chore(deps-dev): bump isort from 7.0.0 to 8.0.1 (#8101) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.243.0a0 to 2.248.0a0 (#8103) by @dependabot[bot]
- chore(deps-dev): bump types-requests from 2.32.4.20260107 to 2.33.0.20260402 (#8102) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.15.8 to 0.15.9 in the dev-dependencies group (#8100) by @dependabot[bot]
- chore(deps-dev): bump requests from 2.33.0 to 2.33.1 (#8104) by @dependabot[bot]
- chore(deps-dev): bump ty from 0.0.23 to 0.0.26 (#8078) by @dependabot[bot]
- chore(deps-dev): bump pygments from 2.19.2 to 2.20.0 (#8077) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
8f41b60to868ad4din /docs (#8083) by @dependabot[bot] - chore(deps-dev): bump the dev-dependencies group across 1 directory with 4 updates (#8086) by @dependabot[bot]
- chore(deps): bump mkdocs-material from 9.7.5 to 9.7.6 (#8079) by @dependabot[bot]
- chore(deps): bump valkey-glide from 2.2.7 to 2.3.0 (#8080) by @dependabot[bot]
- chore(deps-dev): bump sentry-sdk from 2.54.0 to 2.56.0 (#8082) by @dependabot[bot]
- chore(deps): bump cryptography from 46.0.5 to 46.0.6 (#8072) by @dependabot[bot]
- chore(deps): bump the github-actions group across 1 directory with 10 updates (#8081) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1111.0 to 2.1113.0 in the aws-cdk group (#8058) by @dependabot[bot]
- chore(deps-dev): bump requests from 2.32.5 to 2.33.0 (#8069) by @dependabot[bot]
- chore(deps): bump requests from 2.32.4 to 2.33.0 in /docs (#8070) by @dependabot[bot]
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.315 to 0.1.316 (#8061) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.42.73 to 1.42.74 (#8062) by @dependabot[bot]
- chore(deps): bump mkdocs-material from 9.7.1 to 9.7.5 (#8045) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.42.67 to 1.42.68 (#8043) by @dependabot[bot]
- chore(deps-dev): bump nox from 2025.11.12 to 2026.2.9 (#8044) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1110.0 to 2.1111.0 in the aws-cdk group (#8039) by @dependabot[bot]
- chore(deps): bump protobuf from 6.33.5 to 7.34.0 (#8046) by @dependabot[bot]
This release was made possible by the following contributors:
@abhu85, @danjhd, @dependabot[bot], @github-actions[bot], @leandrodamascena, @oyiz-michael, @ran-isenberg, @siwyd, dependabot[bot] and github-actions[bot]
v3.26.0
Summary
In this release, we are pleased to announce a new utility for interacting with the Lambda Metadata Service, allowing you to easily retrieve information about the Lambda function, such as the Availability Zone ID.
A huge thanks to @acascell, @shaked-lokits, @maxrabin, and @amin-farjadi, for their contributions 🚀🌟
Lambda Metadata Service
You can now use get_lambda_metadata() function fetch metadata from the AWS Lambda Metadata endpoint, such as the Availability Zone ID. Results are cached for the sandbox lifetime and the utility automatically returns empty metadata outside of Lambda, so your code works seamlessly in local development and testing.
from aws_lambda_powertools import Logger
from aws_lambda_powertools.utilities.metadata import LambdaMetadata, get_lambda_metadata
from aws_lambda_powertools.utilities.typing import LambdaContext
logger = Logger()
def lambda_handler(event: dict, context: LambdaContext) -> dict:
metadata: LambdaMetadata = get_lambda_metadata()
az_id = metadata.availability_zone_id # e.g., "use1-az1"
logger.append_keys(az_id=az_id)
logger.info("Processing request")
return {"az_id": az_id}Changes
- fix(ci): add ty check to parameters folder (#8035) by @leandrodamascena
- feat(buffer-handler): add buffering support for external loggers (#7994) by @acascell
📜 Documentation updates
- feat: add ldms feature (#8051) by @leandrodamascena
- feat(batch): add Kafka/MSK batch processing support (#7941) by @shaked-lokits
🐛 Bug and hot fixes
- fix(openapi): correct response validation for falsy objects (#7990) by @amin-farjadi
🔧 Maintenance
- fix(ci): add ty check to dataclasses utility (#8038) by @leandrodamascena
- fix(ci): add ty check to parser folder (#8037) by @leandrodamascena
- chore(deps): bump valkey-glide from 2.2.5 to 2.2.7 (#8030) by @dependabot[bot]
- chore(deps): bump aws-encryption-sdk from 4.0.3 to 4.0.4 (#8027) by @dependabot[bot]
- chore(deps-dev): bump types-python-dateutil from 2.9.0.20260124 to 2.9.0.20260305 (#8029) by @dependabot[bot]
- chore(deps-dev): bump ijson from 3.4.0.post0 to 3.5.0 (#8028) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1108.0 to 2.1110.0 in the aws-cdk group (#8023) by @dependabot[bot]
This release was made possible by the following contributors:
@acascell, @amin-farjadi, @dependabot[bot], @github-actions[bot], @leandrodamascena, @shaked-lokits, dependabot[bot] and github-actions[bot]
v3.25.0
Summary
This release introduces per-route validation support in event handler, durable context support for logger and metric decorators, multiple dimension sets in metrics, S3 IntelligentTiering event support, and a URL-decode flag for ALB query parameters. We also shipped several important bug fixes across logger, parameters, event handler, and typing.
A huge thanks to @oyiz-michael, @chriselion, @maxrabin, @facu-01, and @Iamrodos, for their contributions 🚀🌟
Per-route validation support
You can now enable or disable validation on individual routes. This is useful when migrating incrementally - enable validation globally and opt-out specific legacy routes, or vice versa.
from aws_lambda_powertools.event_handler import APIGatewayRestResolver
from pydantic import BaseModel
app = APIGatewayRestResolver(enable_validation=True)
class Todo(BaseModel):
title: str
completed: bool
# This route has validation enabled (inherits from resolver)
@app.post("/todos")
def create_todo(todo: Todo) -> dict:
return {"title": todo.title}
# This route opts out of validation
@app.get("/legacy", enable_validation=False)
def legacy_endpoint():
return {"message": "no validation here"}Durable Context support in Logger and Metrics decorators
Logger and Metrics decorators now handle AWS Lambda Durable Context automatically. When a durable function replays, the decorators unwrap the DurableContext to access the underlying Lambda context - no changes needed in your code.
from aws_lambda_powertools import Logger, Metrics
from aws_lambda_powertools.metrics import MetricUnit
logger = Logger()
metrics = Metrics()
@logger.inject_lambda_context # automatically handles DurableContext
@metrics.log_metrics # automatically handles DurableContext
def lambda_handler(event, context):
logger.info("Processing event")
metrics.add_metric(name="InvocationCount", unit=MetricUnit.Count, value=1)
return {"statusCode": 200}Multiple dimension sets in Metrics
You can now publish metrics with multiple dimension sets using add_dimensions(). Each call creates a new dimension set in the CloudWatch EMF output.
from aws_lambda_powertools import Metrics
from aws_lambda_powertools.metrics import MetricUnit
metrics = Metrics()
@metrics.log_metrics
def lambda_handler(event, context):
metrics.add_metric(name="OrderCount", unit=MetricUnit.Count, value=1)
# Each call creates a separate dimension set
metrics.add_dimensions(environment="prod", region="us-east-1")
metrics.add_dimensions(service="orders", team="backend")ALB URL-decode query parameters
A new decode_query_parameters flag in ALBResolver automatically URL-decodes query parameter keys and values.
from aws_lambda_powertools.event_handler import ALBResolver
app = ALBResolver(decode_query_parameters=True)
@app.get("/search")
def search():
# Query params are automatically URL-decoded
query = app.current_event.query_string_parameters
return {"query": query}Changes
- fix(ci): remove DUB region (#8031) by @leandrodamascena
- fix(event_handler): add middleware validation per route (#8020) by @leandrodamascena
- chore: remove unused PR automation workflows (#8008) by @dreamorosi
- feat(event-handler): add per-route validation support (#7965) by @oyiz-michael
- feat(event_source): add support for S3 IntelligentTiering events (#7954) by @oyiz-michael
- feat: Add a flag to ALBResolver to URL-decode query parameters (#7940) by @chriselion
- refactor(batch): improve type annotation for event parameter (#7924) by @maxrabin
🌟New features and non-breaking changes
- feat: add HttpResolverAlpha resolver (#7913) by @leandrodamascena
- feat(openapi): add support for micro Lambda pattern (#7920) by @leandrodamascena
- feat(decorators): Support Durable Context in logger and metric decorators (#7765) by @ConnorKirk
- feat(metrics): add support for multiple dimension sets (#7848) by @oyiz-michael
📜 Documentation updates
- chore(deps): bump squidfunk/mkdocs-material from
3bba0a9to8f41b60in /docs (#8010) by @dependabot[bot] - docs: clarify append_context_keys behavior with overlapping keys (#7846) by @oyiz-michael
🐛 Bug and hot fixes
- fix(logger): preserve percent-style formatting args in flush_buffer (#8009) by @dreamorosi
- fix(parameters): fix variable shadowing in SSM parameter chunking (#8006) by @dreamorosi
- fix(event_handler): return 415 status_code for unsupported content-type headers (#7980) by @chriselion
- fix(typing): resolve ty diagnostics in logging and metrics modules (#7953) by @ConnorKirk
- fix(event-handler): prevent OpenAPI schema bleed when reusing response dictionaries (#7952) by @oyiz-michael
- fix(event_handler): sync alias and validation_alias for Pydantic 2.12+ compatibility (#7901) by @leandrodamascena
- fix(typing): accept Mapping type in resolve() for event parameter (#7909) by @Iamrodos
- fix(event_handler): fix bug regression in Annotated field (#7904) by @leandrodamascena
- fix(event_handler): preserve openapi_examples on Body (#7862) by @facu-01
🔧 Maintenance
- chore(deps): bump valkey-glide from 2.2.5 to 2.2.7 (#8030) by @dependabot[bot]
- chore(deps): bump aws-encryption-sdk from 4.0.3 to 4.0.4 (#8027) by @dependabot[bot]
- chore(deps-dev): bump types-python-dateutil from 2.9.0.20260124 to 2.9.0.20260305 (#8029) by @dependabot[bot]
- chore(deps-dev): bump ijson from 3.4.0.post0 to 3.5.0 (#8028) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1108.0 to 2.1110.0 in the aws-cdk group (#8023) by @dependabot[bot]
- chore(deps-dev): bump filelock from 3.24.2 to 3.25.0 (#8016) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1106.0 to 2.1108.0 in the aws-cdk group (#8011) by @dependabot[bot]
- chore(deps): bump datadog-lambda from 8.120.0 to 8.121.0 (#8015) by @dependabot[bot]
- chore(deps): bump the github-actions group with 4 updates (#8013) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.44.0 to 1.46.0 (#8018) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
3bba0a9to8f41b60in /docs (#8010) by @dependabot[bot] - chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.233.0a0 to 2.238.0a0 (#7997) by @dependabot[bot]
- chore(deps-dev): bump types-python-dateutil from 2.9.0.20251115 to 2.9.0.20260124 (#7989) by @dependabot[bot]
- chore(deps-dev): bump sentry-sdk from 2.52.0 to 2.53.0 (#7998) by @dependabot[bot]
- chore(deps-dev): bump filelock from 3.20.3 to 3.24.2 (#7999) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1105.0 to 2.1106.0 in the aws-cdk group (#7995) by @dependabot[bot]
- chore(deps): bump actions/dependency-review-action from 4.8.2 to 4.8.3 in the github-actions group (#8004) by @dependabot[bot]
- chore(deps): bump cryptography from 46.0.3 to 46.0.5 (#7991) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.237.1 to 2.238.0 (#7986) by @dependabot[bot]
- chore(deps-dev): bump testcontainers from 4.14.0 to 4.14.1 (#7988) by @dependabot[bot]
- chore(deps-dev): bump sentry-sdk from 2.48.0 to 2.52.0 (#7987) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1103.0 to 2.1105.0 in the aws-cdk group (#7982) by @dependabot[bot]
- chore(deps): bump the github-actions group with 2 updates (#7985) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.233.0 to 2.236.0 (#7974) by @dependabot[bot]
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.312 to 0.1.314 (#7973) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.43.3 to 1.43.4 (#7972) by @dependabot[bot]
- chore(deps): bump jmespath from 1.0.1 to 1.1.0 (#7970) by @dependabot[bot]
- chore(deps): bump the github-actions group with 3 updates (#7971) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1101.0 to 2.1103.0 in the aws-cdk group (#7967) by @dependabot[bot]
- chore(deps-dev): bump the dev-dependencies group with 2 updates (#7969) by @dependabot[bot]
- chore(deps): bump protobuf from 6.33.4 to 6.33.5 (#7977) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.43.2 to 1.43.3 (#7958) by @dependabot[bot]
- chore(deps-dev): bump testcontainers from 4.13.3 to 4.14.0 (#7959) by @[depe...
v3.24.0
Summary
This release adds support for Lambda durable function replay in idempotency, a new parser model for DynamoDB Stream on-failure destinations, and a fix for batch processor. We've also dropped Python 3.9 support.
A super thanks to @ConnorKirk for implementing the idempotency replay feature and @exg for the batch processor fix and DynamoDB Stream parser model 🚀🌟
Idempotency: Allow durable functions to replay
AWS Lambda durable functions enable you to build resilient multi-step applications that can execute for up to one year while maintaining reliable progress despite interruptions. When a durable function resumes from a wait point or interruption, the system performs replay - running your code from the beginning but skipping completed checkpoints.
This release adds support for durable function replay in idempotency. When using the @idempotent decorator on lambda_handler, replay is automatically detected from the DurableContext - no manual configuration needed.
from aws_lambda_powertools.utilities.idempotency import idempotent, DynamoDBPersistenceLayer, IdempotencyConfig
persistence_layer = DynamoDBPersistenceLayer(table_name="idempotency_store")
config = IdempotencyConfig(event_key_jmespath="body")
@idempotent(config=config, persistence_store=persistence_layer)
def lambda_handler(event, context):
# Replay is automatically detected when context is a DurableContext
# During replay, INPROGRESS records are handled gracefully
return {"statusCode": 200}DynamoDB Stream On-Failure Destination parser model
A new parser model DynamoDBStreamLambdaOnFailureDestinationModel is now available for parsing DynamoDB Stream on-failure destination events.
from aws_lambda_powertools.utilities.parser import parse
from aws_lambda_powertools.utilities.parser.models import DynamoDBStreamLambdaOnFailureDestinationModel
def lambda_handler(event, context):
parsed = parse(event=event, model=DynamoDBStreamLambdaOnFailureDestinationModel)
batch_info = parsed.ddb_stream_batch_info
print(f"Failed batch from shard: {batch_info.shard_id}")
print(f"Stream ARN: {batch_info.stream_arn}")Changes
🌟New features and non-breaking changes
- feat(idempotency): Allow durable functions to replay (#7764) by @ConnorKirk
📜 Documentation updates
- docs(homepage): reorganize homepage and create dedicated installation page (#7896) by @leandrodamascena
- docs(readme): update features list and improve readability (#7889) by @leandrodamascena
- feat(parser): add model for the DynamoDB Stream Lambda invocation record (#7818) by @exg
- docs(event-handler): add docstring for serializer in
BedrockAgentFunctionResolver(#7808) by @dreamorosi - docs: add EF Education First as customer reference (#7809) by @dreamorosi
- docs: clarify BedrockResponse.is_json() always returns True (#7748) by @oyiz-michael
🐛 Bug and hot fixes
- fix(batch_processor): fix batch processor (#7798) by @exg
- fix(data-classes): ensure lazy initialization for Cognito token generation response properties (#7653) by @nc-dirknilius
- fix(ci): add missing dollar signs in SSM parameter path variables (#7695) by @Iamrodos
🔧 Maintenance
- chore(ci): remove daily changelog rebuild schedule (#7897) by @leandrodamascena
- chore(ci): remove automated pre-release schedule (#7894) by @leandrodamascena
- chore(deps-dev): bump boto3-stubs from 1.42.19 to 1.42.21 (#7892) by @dependabot[bot]
- chore(deps): bump the github-actions group with 2 updates (#7893) by @dependabot[bot]
- chore(ci): improve dependabot workflow to reduce noise (#7890) by @leandrodamascena
- chore(deps-dev): bump boto3-stubs from 1.42.17 to 1.42.19 (#7873) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.232.2a0 to 2.233.0a0 (#7868) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.43.0 to 1.43.1 (#7869) by @dependabot[bot]
- chore(deps-dev): bump coverage from 7.13.0 to 7.13.1 (#7867) by @dependabot[bot]
- chore(maintenance): remove cloud development environment configurations (#7887) by @leandrodamascena
- chore(deps-dev): bump filelock from 3.20.1 to 3.20.2 (#7876) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.232.2 to 2.233.0 (#7845) by @dependabot[bot]
- chore(deps): bump docker/setup-buildx-action from 3.11.1 to 3.12.0 (#7843) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.42.11 to 1.42.13 (#7844) by @dependabot[bot]
- chore(deps): bump mkdocs-material from 9.7.0 to 9.7.1 (#7838) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.14.9 to 0.14.10 (#7839) by @dependabot[bot]
- chore(deps): bump valkey-glide from 2.2.2 to 2.2.3 (#7837) by @dependabot[bot]
- chore(deps): bump mkdocs-material from 9.7.0 to 9.7.1 in /docs (#7836) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
980e11fto3bba0a9in /docs (#7835) by @dependabot[bot] - chore(deps-dev): bump aws-cdk from 2.1100.0 to 2.1100.1 (#7830) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.42.10 to 1.42.11 (#7831) by @dependabot[bot]
- chore(deps-dev): bump isort from 6.1.0 to 7.0.0 (#7824) by @dependabot[bot]
- chore(deps-dev): bump pytest from 8.4.2 to 9.0.2 (#7826) by @dependabot[bot]
- chore(deps): bump pymdown-extensions from 10.16 to 10.16.1 in /docs (#7827) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.14.8 to 0.14.9 (#7823) by @dependabot[bot]
- chore(deps-dev): bump pytest-asyncio from 1.2.0 to 1.3.0 (#7825) by @dependabot[bot]
- chore(deps-dev): bump urllib3 from 2.5.0 to 2.6.0 in /layer_v3 (#7820) by @dependabot[bot]
- chore: drop Python3.9 support - WIP (#7807) by @leandrodamascena
- chore(ci): update layer version for all AWS partitions in docs (#7757) by @oyiz-michael
- chore(deps-dev): bump cfn-lint from 1.42.0 to 1.43.0 (#7812) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1034.0 to 2.1100.0 (#7811) by @dependabot[bot]
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 4.0.0 to 4.0.1 (#7810) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.42.7 to 1.42.9 (#7814) by @dependabot[bot]
- chore(deps): bump datadog-lambda from 8.118.0 to 8.120.0 (#7815) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.232.1 to 2.232.2 (#7816) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.41.0 to 1.42.0 (#7784) by @dependabot[bot]
- chore(deps-dev): bump sentry-sdk from 2.45.0 to 2.47.0 (#7790) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1033.0 to 2.1034.0 (#7795) by @dependabot[bot]
- chore(deps): bump actions/download-artifact from 6.0.0 to 7.0.0 (#7801) by @dependabot[bot]
- chore(deps-dev): bump types-protobuf from 6.32.1.20251105 to 6.32.1.20251210 (#7793) by @dependabot[bot]
- chore(deps): bump actions/upload-artifact from 5.0.0 to 6.0.0 (#7800) by @dependabot[bot]
- chore(deps): bump codecov/codecov-action from 5.5.1 to 5.5.2 (#7788) by @dependabot[bot]
- chore(deps): bump valkey-glide from 2.2.1 to 2.2.2 (#7802) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.42.6 to 1.42.7 (#7796) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.42.4 to 1.42.6 (#7791) by @dependabot[bot]
- chore(deps): bump protobuf from 6.33.1 to 6.33.2 (#7786) by @dependabot[bot]
- chore(deps): bump datadog-lambda from 8.116.0 to 8.118.0 (#7785) by @dependabot[bot]
- chore(deps): bump valkey-glide from 2.1.1 to 2.2.1 (#7783) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.41.2 to 1.41.5 (#7768) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.14.6 to 0.14.7 (#7770) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.227.0a0 to 2.231.0a0 (#7767) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.227.0 to 2.231.0 (#7771) by @[dependabot[bot]](https://githu...
v3.23.0
Summary
In this release we added support for the newly released Python 3.14 AWS Lambda managed runtime 🚀.
Changes
📜 Documentation updates
- docs(openapi): Update docstring's openapi default version to match current default version (#7669) by @victorperezpiqueras
- docs(batch): fix error handling code highlight line number (#7638) by @ConnorKirk
🐛 Bug and hot fixes
- fix(ci): add missing dollar signs in SSM parameter path variables (#7695) by @Iamrodos
- fix(layer): bump cdk version (#7677) by @leandrodamascena
🔧 Maintenance
- chore(deps-dev): bump boto3-stubs from 1.40.73 to 1.40.74 (#7703) by @dependabot[bot]
- chore(deps-dev): bump types-python-dateutil from 2.9.0.20251108 to 2.9.0.20251115 (#7702) by @dependabot[bot]
- chore(deps): bump actions/checkout from 5.0.0 to 5.0.1 (#7701) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1031.2 to 2.1032.0 (#7700) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.224.0a0 to 2.225.0a0 (#7704) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.72 to 1.40.73 (#7688) by @dependabot[bot]
- chore(deps): bump redis from 6.4.0 to 7.0.1 (#7687) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.14.4 to 0.14.5 (#7682) by @dependabot[bot]
- chore(deps): bump protobuf from 6.33.0 to 6.33.1 (#7681) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.223.0a0 to 2.224.0a0 (#7680) by @dependabot[bot]
- fix(layer): bump cdk version (#7677) by @leandrodamascena
- chore(ci): adding support for Python 3.14 - WIP (#7431) by @leandrodamascena
- chore(deps-dev): bump sentry-sdk from 2.43.0 to 2.44.0 (#7665) by @dependabot[bot]
- chore(deps-dev): bump nox from 2025.10.16 to 2025.11.12 (#7671) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.222.0a0 to 2.223.0a0 (#7664) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.70 to 1.40.71 (#7672) by @dependabot[bot]
- chore(deps): bump mkdocs-material from 9.6.23 to 9.7.0 in /docs (#7663) by @dependabot[bot]
- chore(deps): bump actions/dependency-review-action from 4.8.1 to 4.8.2 (#7662) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
58dee36to980e11fin /docs (#7661) by @dependabot[bot] - chore(deps-dev): bump boto3-stubs from 1.40.64 to 1.40.69 (#7654) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.222.0 to 2.223.0 (#7656) by @dependabot[bot]
- chore(deps-dev): bump pytest-benchmark from 5.2.1 to 5.2.3 (#7658) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.14.3 to 0.14.4 (#7649) by @dependabot[bot]
- chore(deps): bump mkdocstrings-python from 1.18.2 to 1.19.0 in /docs (#7655) by @dependabot[bot]
- chore(deps-dev): bump types-python-dateutil from 2.9.0.20251008 to 2.9.0.20251108 (#7657) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1031.1 to 2.1031.2 (#7645) by @dependabot[bot]
- chore(docs): fix broken images (#7644) by @dreamorosi
- chore(deps): bump docker/setup-qemu-action from 3.6.0 to 3.7.0 (#7639) by @dependabot[bot]
- chore(deps-dev): bump types-protobuf from 6.32.1.20250918 to 6.32.1.20251105 (#7640) by @dependabot[bot]
- chore(deps): bump pydantic from 2.12.3 to 2.12.4 (#7641) by @dependabot[bot]
This release was made possible by the following contributors:
@ConnorKirk, @Iamrodos, @T90REAL, @dependabot[bot], @dreamorosi, @github-actions[bot], @leandrodamascena, @victorperezpiqueras, dependabot[bot] and github-actions[bot]
v3.22.1
Summary
In this release, we fixed a regression introduced by PR #7227 that affected customers using the Event Handler utility with nested metadata annotations such as annotated_types or Interval. Thanks to @rtandy for identifying the bug and validating the fix.
We also fixed small bugs in type annotations and in our documentation.
⭐ Congrats @rpivo and @czechnology for contributing to this project for the first time!
Changes
- fix(typing): Fix type of Metrics.set_timestamp argument (#7582) by @czechnology
📜 Documentation updates
- docs(batch): fix error handling code highlight line number (#7638) by @ConnorKirk
- docs(tracer): fix typo in the tracer documentation (#7617) by @rpivo
🐛 Bug and hot fixes
- fix(event-handler): preserve metadata constraints in parameter validation (#7609) by @leandrodamascena
- fix(batch): ensure Python 3.14 compatibility for async event loop handling (#7599) by @leandrodamascena
🔧 Maintenance
- chore(deps): bump docker/setup-qemu-action from 3.6.0 to 3.7.0 (#7639) by @dependabot[bot]
- chore(deps-dev): bump types-protobuf from 6.32.1.20250918 to 6.32.1.20251105 (#7640) by @dependabot[bot]
- chore(deps): bump pydantic from 2.12.3 to 2.12.4 (#7641) by @dependabot[bot]
- chore(deps): bump mkdocs-material from 9.6.22 to 9.6.23 (#7630) by @dependabot[bot]
- chore(deps-dev): bump pytest-benchmark from 5.2.0 to 5.2.1 (#7629) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.40.3 to 1.40.4 (#7632) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.221.1a0 to 2.222.0a0 (#7628) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.221.1 to 2.222.0 (#7631) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
f5c556ato58dee36in /docs (#7622) by @dependabot[bot] - chore(deps): bump mkdocs-material from 9.6.22 to 9.6.23 (#7624) by @dependabot[bot]
- chore(event_handler): fix typos in api_gateway.py file (#7619) by @mahveotm
- chore(deps-dev): bump hvac from 2.3.0 to 2.4.0 (#7602) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.14.2 to 0.14.3 (#7610) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.61 to 1.40.64 (#7611) by @dependabot[bot]
- chore(deps-dev): bump pytest-benchmark from 5.1.0 to 5.2.0 (#7606) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1031.0 to 2.1031.1 (#7601) by @dependabot[bot]
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.311 to 0.1.312 (#7605) by @dependabot[bot]
- chore(deps): bump aws-xray-sdk from 2.14.0 to 2.15.0 (#7603) by @dependabot[bot]
- chore(deps-dev): bump sentry-sdk from 2.42.1 to 2.43.0 (#7594) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.221.0a0 to 2.221.1a0 (#7593) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.60 to 1.40.61 (#7590) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.40.2 to 1.40.3 (#7585) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.59 to 1.40.60 (#7587) by @dependabot[bot]
- chore(deps): bump redis from 7.0.0 to 7.0.1 (#7586) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.14.1 to 0.14.2 (#7575) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.55 to 1.40.59 (#7579) by @dependabot[bot]
- chore(deps): bump redis from 6.4.0 to 7.0.0 (#7570) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.220.0a0 to 2.221.0a0 (#7580) by @dependabot[bot]
- chore(deps): bump actions/upload-artifact from 4.6.2 to 5.0.0 (#7578) by @dependabot[bot]
- chore(deps): bump actions/download-artifact from 5.0.0 to 6.0.0 (#7577) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1030.0 to 2.1031.0 (#7569) by @dependabot[bot]
This release was made possible by the following contributors:
@ConnorKirk, @czechnology, @dependabot[bot], @github-actions[bot], @leandrodamascena, @mahveotm, @rpivo, dependabot[bot] and github-actions[bot]
v3.22.0
Summary
This release enhances our Event Handler with support for Pydantic Models when validating query strings and headers parameters. This addition brings type safety, automatic validation, and better developer experience to your API endpoints.
A super thanks to @tonnico for implementing this important feature 🚀 🌟
📜 Announcement: You can now find our documentation on the official AWS documentation domain at docs.aws.amazon.com/powertools/python.
Using Pydantic models to validate query strings and headers parameters
You can now use Pydantic's models to validate query strings and headers parameters. This allows you to have structured, type-safe validation with automatic error handling and clear validation messages.
Why this important:
- Type safety: Catch validation errors at runtime with clear error messages
- Developer experience: Get IDE autocompletion and type hints for your parameters
- Documentation: Self-documenting code through Pydantic model definitions
- Model reusability: Use the same validation model across multiple endpoints for consistency
Changes
🌟New features and non-breaking changes
📜 Documentation updates
- docs(idempotency): removed inexistent css class (#7539) by @leandrodamascena
🐛 Bug and hot fixes
- fix(event_handler): Preserve
examplesfield in OpenAPI schema for BedrockAgentResolver (#7561) by @leandrodamascena
🔧 Maintenance
- chore(deps-dev): bump sentry-sdk from 2.42.0 to 2.42.1 (#7562) by @dependabot[bot]
- chore(deps-dev): bump nox from 2025.10.14 to 2025.10.16 (#7557) by @dependabot[bot]
- chore(deps-dev): bump mypy-boto3-appconfigdata from 1.40.0 to 1.40.55 in the boto-typing group (#7554) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.54 to 1.40.55 (#7555) by @dependabot[bot]
- chore(deps): bump pydantic from 2.12.2 to 2.12.3 (#7556) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.53 to 1.40.54 (#7547) by @dependabot[bot]
- chore(deps): bump protobuf from 6.32.1 to 6.33.0 (#7544) by @dependabot[bot]
- chore(deps): bump avro from 1.12.0 to 1.12.1 (#7546) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.14.0 to 0.14.1 (#7545) by @dependabot[bot]
- chore(ci): update CONTRIBUTING.md (#7549) by @ConnorKirk
- chore(deps-dev): bump sentry-sdk from 2.41.0 to 2.42.0 (#7533) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.51 to 1.40.53 (#7535) by @dependabot[bot]
- chore: use approved sample names and addresses (#7542) by @sthulb
- chore(deps-dev): bump nox from 2024.10.9 to 2025.10.14 (#7532) by @dependabot[bot]
- chore(deps): bump mkdocs-material from 9.6.21 to 9.6.22 (#7534) by @dependabot[bot]
- chore(deps): bump mkdocs-material from 9.6.21 to 9.6.22 in /docs (#7531) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
00f9276tof5c556ain /docs (#7530) by @dependabot[bot] - chore(deps): bump pydantic from 2.12.0 to 2.12.2 (#7522) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.40.1 to 1.40.2 (#7525) by @dependabot[bot]
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.310 to 0.1.311 (#7523) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.219.0a0 to 2.220.0a0 (#7526) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.219.0 to 2.220.0 (#7524) by @dependabot[bot]
- chore(deps): bump actions/setup-node from 5.0.0 to 6.0.0 (#7521) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.49 to 1.40.51 (#7517) by @dependabot[bot]
- chore(deps): bump actions/dependency-review-action from 4.8.0 to 4.8.1 (#7516) by @dependabot[bot]
- chore(deps-dev): bump ijson from 3.4.0 to 3.4.0.post0 (#7510) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1029.4 to 2.1030.0 (#7508) by @dependabot[bot]
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.309 to 0.1.310 (#7509) by @dependabot[bot]
- chore(ci): improve message when do-not-merge label is present (#7505) by @tonnico
- chore(deps-dev): bump cfn-lint from 1.40.0 to 1.40.1 (#7502) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.47 to 1.40.49 (#7503) by @dependabot[bot]
- chore(deps-dev): bump sentry-sdk from 2.40.0 to 2.41.0 (#7504) by @dependabot[bot]
- chore(deps): bump valkey-glide from 2.1.0 to 2.1.1 (#7498) by @dependabot[bot]
- chore(deps-dev): bump types-python-dateutil from 2.9.0.20250822 to 2.9.0.20251008 (#7499) by @dependabot[bot]
This release was made possible by the following contributors:
@ConnorKirk, @dependabot[bot], @github-actions[bot], @leandrodamascena, @sthulb, @tonnico, dependabot[bot] and github-actions[bot]
v3.21.0
Summary
This release enhances our Event Handler with support for Pydantic Field discriminators and improved OpenAPI response capabilities. We've also expanded our Parser utility with better AppSync and CloudWatch models, plus important bug fixes for form data handling.
⭐️ Congrats to @dap0am, @tonnico, @sreejaaryahi18, @aalvrzf, @Iamrodos, and @dcabib for contributing to this release!
Pydantic Field discriminator support
You can now use Pydantic's discriminator feature in your Event Handler validation. This allows you to handle polymorphic data structures with union types more efficiently.
Enhanced OpenAPI responses
The OpenAPI utility now supports richer response definitions including headers, links, examples, and encoding specifications, giving you more control over your API documentation.
Changes
🌟New features and non-breaking changes
- feat(event_handler): enhance OpenAPI response with headers, links, examples and encoding (#7312) by @dcabib
- feat(parser): add field metadata and examples for CloudWatch models (#7343) by @sreejaaryahi18
📜 Documentation updates
- docs(aws): add AWS docs bootstrap JavaScript (#7472) by @leandrodamascena
- docs(logger): clarify Advanced Logging Controls interaction with sampling (#7429) by @kattakaha
- docs(event_handler): remove the wrong CORS warning (#7385) by @leandrodamascena
- docs(event_handler): update test section (#7374) by @aalvrz
- feat(event-handler): add support for Pydantic Field discriminator in validation (#7227) by @dap0am
- docs(event_handler): add info section about types (#7368) by @leandrodamascena
🐛 Bug and hot fixes
- fix(event_handler): parse single list items in form data (#7415) by @tonnico
- fix(docs): correct build optimization script and docs (#7367) by @Iamrodos
🔧 Maintenance
- chore(ci): improve message when do-not-merge label is present (#7505) by @tonnico
- chore(deps-dev): bump cfn-lint from 1.40.0 to 1.40.1 (#7502) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.47 to 1.40.49 (#7503) by @dependabot[bot]
- chore(deps-dev): bump sentry-sdk from 2.40.0 to 2.41.0 (#7504) by @dependabot[bot]
- chore(deps): bump valkey-glide from 2.1.0 to 2.1.1 (#7498) by @dependabot[bot]
- chore(deps-dev): bump types-python-dateutil from 2.9.0.20250822 to 2.9.0.20251008 (#7499) by @dependabot[bot]
- chore(deps): bump pydantic from 2.11.10 to 2.12.0 (#7491) by @dependabot[bot]
- chore: Fix Discord badge in README (#7488) by @hjgraca
- chore(deps-dev): bump boto3-stubs from 1.40.45 to 1.40.47 (#7490) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.13.3 to 0.14.0 (#7489) by @dependabot[bot]
- chore(deps): bump pydantic from 2.11.9 to 2.11.10 (#7483) by @dependabot[bot]
- chore(deps-dev): bump sentry-sdk from 2.39.0 to 2.40.0 (#7484) by @dependabot[bot]
- chore(deps): bump mkdocs-llmstxt from 0.3.2 to 0.4.0 (#7475) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.44 to 1.40.45 (#7474) by @dependabot[bot]
- chore(deps): bump mkdocs-llmstxt from 0.3.2 to 0.4.0 in /docs (#7473) by @dependabot[bot]
- chore(deps-dev): bump isort from 6.0.1 to 6.1.0 (#7461) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.13.2 to 0.13.3 (#7465) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1029.3 to 2.1029.4 (#7459) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.218.0a0 to 2.219.0a0 (#7464) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.42 to 1.40.43 (#7460) by @dependabot[bot]
- chore(deps): bump ossf/scorecard-action from 2.4.2 to 2.4.3 (#7458) by @dependabot[bot]
- chore(deps): bump mkdocs-material from 9.6.20 to 9.6.21 (#7455) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.41 to 1.40.42 (#7454) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
86d21dato00f9276in /docs (#7452) by @dependabot[bot] - chore(deps): bump mkdocs-material from 9.6.20 to 9.6.21 in /docs (#7453) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.39.1 to 1.40.0 (#7447) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.40 to 1.40.41 (#7445) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.217.0a0 to 2.218.0a0 (#7448) by @dependabot[bot]
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.25 to 4.0.0 (#7449) by @dependabot[bot]
- chore(deps): bump pydantic-settings from 2.10.1 to 2.11.0 (#7434) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.39 to 1.40.40 (#7433) by @dependabot[bot]
- chore(deps-dev): bump mypy from 1.18.1 to 1.18.2 (#7435) by @dependabot[bot]
- chore(deps): bump mkdocs-llmstxt from 0.3.1 to 0.3.2 (#7436) by @dependabot[bot]
- chore(deps-dev): bump coverage from 7.10.6 to 7.10.7 (#7437) by @dependabot[bot]
- chore(deps): bump actions/dependency-review-action from 4.7.3 to 4.8.0 (#7432) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.12.12 to 0.13.2 (#7427) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.32 to 1.40.39 (#7425) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.215.0a0 to 2.217.0a0 (#7424) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.215.0 to 2.217.0 (#7423) by @dependabot[bot]
- chore(deps-dev): bump sentry-sdk from 2.38.0 to 2.39.0 (#7426) by @dependabot[bot]
- chore(deps-dev): bump sentry-sdk from 2.37.1 to 2.38.0 (#7402) by @dependabot[bot]
- chore(deps): bump valkey-glide from 2.0.1 to 2.1.0 (#7403) by @dependabot[bot]
- chore(deps-dev): bump pytest-mock from 3.15.0 to 3.15.1 (#7396) by @dependabot[bot]
- chore(deps): bump mkdocs-llmstxt from 0.3.1 to 0.3.2 in /docs (#7409) by @dependabot[bot]
- chore(deps-dev): bump types-protobuf from 6.30.2.20250822 to 6.32.1.20250918 (#7406) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1029.2 to 2.1029.3 (#7420) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1029.1 to 2.1029.2 (#7400) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.31 to 1.40.32 (#7395) by @dependabot[bot]
- chore(deps): bump pydantic from 2.11.7 to 2.11.9 (#7390) by @dependabot[bot]
- chore(deps): bump mkdocs-material from 9.6.19 to 9.6.20 (#7389) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.214.0a0 to 2.215.0a0 (#7391) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.30 to 1.40.31 (#7388) by @dependabot[bot]
- chore(deps): bump mkdocs-material from 9.6.19 to 9.6.20 in /docs (#7387) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
209b62dto86d21dain /docs (#7386) by @dependabot[bot] - chore(deps-dev): bump boto3-stubs from 1.40.29 to 1.40.30 (#7378) by @dependabot[bot]
- chore(deps-dev): bump pytest-asyncio from 1.1.0 to 1.2.0 (#7377) by @dependabot[bot]
- chore(deps): bump protobuf from 6.32.0 to 6.32.1 (#7376) by @dependabot[bot]
- chore(deps-dev): bump mypy from 1.17.1 to 1.18.1 (#7375) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.27 to 1.40.29 (#7371) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1029.0 to 2.1029.1 (#7370) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.40.26 to 1.40.27 (#7358) by @dependabot[bot]
- chore(deps-dev): bump pytest-cov from 6.3.0 to 7.0.0 (#7357) b...