·
6 commits
to refs/heads/develop
since this release
Summary
This release adds a custom serializer option to the BedrockAgentResolver, plus documentation improvements and bug fixes across the Event Handler.
A huge thanks to @kimnamu, @Avinm and @hirenkumar-n-dholariya for their contributions!
Custom serializer on BedrockAgentResolver
You can now pass your own serializer to BedrockAgentResolver, the same way the other resolvers already allow. This lets you control exactly how responses are serialized to JSON, for example to handle custom types or tune the output format.
import json
from decimal import Decimal
from aws_lambda_powertools.event_handler import BedrockAgentResolver
from aws_lambda_powertools.utilities.typing import LambdaContext
def custom_serializer(obj: dict) -> str:
return json.dumps(obj, default=str)
app = BedrockAgentResolver(serializer=custom_serializer)
@app.get("/price", description="Returns the current price")
def get_price() -> dict:
return {"price": Decimal("9.99")}
def lambda_handler(event: dict, context: LambdaContext):
return app.resolve(event, context)Changes
- feat(event_handler): allow custom serializer on BedrockAgentResolver (#8271) by @kimnamu
- fix(event-handler): handle CORS preflight OPTIONS in HttpResolverLocal (#8268) by @Avinm
- fix(event-handler): fix ruff lint violations in event_handler module (#8208) by @hirenkumar-n-dholariya
📜 Documentation updates
- refactor(event_handler): promote HttpResolver to stable (#8289) by @leandrodamascena
- fix(batch): add optional logger injection for BatchProcessors (#7553) (#8272) by @Sujit-1509
- docs(event-handler): add import path gotcha for dependency_overrides testing (#8269) by @hirenkumar-n-dholariya
- chore: fix minor typos and grammar in docs and comments (#8245) by @Sujit-1509
- docs(metadata): fix broken Lambda Metadata Endpoint link (#8212) by @derdelean
- chore(deps): consolidate all open Dependabot updates (#8241) by @leandrodamascena
- fix(docs): update broken AWS Lambda Metadata Endpoint link (#8209) by @hirenkumar-n-dholariya
- chore(deps): bump urllib3 from 2.6.3 to 2.7.0 in /docs (#8216) by @dependabot[bot]
- chore(deps): bump gitpython from 3.1.47 to 3.1.50 in /docs (#8213) by @dependabot[bot]
🔧 Maintenance
- chore(deps-dev): bump aws-cdk-lib from 2.259.0 to 2.260.0 (#8294) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1127.0 to 2.1128.1 in the aws-cdk group (#8290) by @dependabot[bot]
- chore(deps): bump the github-actions group with 2 updates (#8292) by @dependabot[bot]
- chore(deps-dev): bump the dev-dependencies group across 1 directory with 3 updates (#8293) by @dependabot[bot]
- chore(deps): bump ujson from 5.12.1 to 5.13.0 (#8298) by @dependabot[bot]
- chore(deps): bump pydantic-settings from 2.14.1 to 2.14.2 (#8299) by @dependabot[bot]
- chore(deps): bump cryptography from 46.0.7 to 48.0.1 (#8286) by @dependabot[bot]
- chore(deps): consolidate Dependabot dependency updates (#8285) by @leandrodamascena
- chore(deps-dev): bump the dev-dependencies group across 1 directory with 2 updates (#8276) by @dependabot[bot]
- chore(deps-dev): bump sentry-sdk from 2.57.0 to 2.62.0 (#8263) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.251.0a0 to 2.259.0a0 (#8262) by @dependabot[bot]
- chore(deps-dev): bump the dev-dependencies group with 3 updates (#8261) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1124.1 to 2.1126.0 in the aws-cdk group across 1 directory (#8255) by @dependabot[bot]
- chore(deps): bump codecov/codecov-action from 6.0.1 to 7.0.0 in the github-actions group (#8260) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.43.3 to 1.43.24 (#8265) by @dependabot[bot]
- chore(deps): update requests requirement from >=2.33.1 to >=2.34.2 in /examples/event_handler_graphql/src (#8254) by @dependabot[bot]
- chore(deps): bump pydantic from 2.12.5 to 2.13.4 (#8252) by @dependabot[bot]
- chore(deps): bump the github-actions group across 1 directory with 5 updates (#8256) by @dependabot[bot]
- chore(deps-dev): bump the dev-dependencies group across 1 directory with 2 updates (#8242) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1122.0 to 2.1124.1 in the aws-cdk group across 1 directory (#8234) by @dependabot[bot]
- chore(deps): consolidate all open Dependabot updates (#8241) by @leandrodamascena
- chore(deps): bump the github-actions group with 3 updates (#8221) by @dependabot[bot]
- chore(deps): consolidate dependabot updates (13052026) (#8228) by @leandrodamascena
- chore(deps-dev): bump urllib3 from 2.6.3 to 2.7.0 in /layer_v3 (#8218) by @dependabot[bot]
- chore(deps-dev): bump urllib3 from 2.6.3 to 2.7.0 (#8217) by @dependabot[bot]
- chore(deps): bump urllib3 from 2.6.3 to 2.7.0 in /docs (#8216) by @dependabot[bot]
- chore(deps): bump gitpython from 3.1.47 to 3.1.50 in /docs (#8213) by @dependabot[bot]
- chore(deps-dev): bump gitpython from 3.1.47 to 3.1.50 (#8214) by @dependabot[bot]
- chore(deps): batch dependency updates (#8207) by @leandrodamascena
This release was made possible by the following contributors:
@Avinm, @Sujit-1509, @dependabot[bot], @derdelean, @github-actions[bot], @hirenkumar-n-dholariya, @kimnamu, @leandrodamascena, dependabot[bot] and github-actions[bot]