Summary
This release introduces a new BedrockAgentFunctionResolver
to Event Handler that simplifies connecting AWS Lambda functions to Amazon Bedrock Agents. This feature eliminates the need to write boilerplate code for parsing requests and formatting responses, allowing you to focus on your agent's business logic.
We would also like to extend a huge thank you to our new contributor @LucasCMFBraga β
Creating Amazon Bedrock Agents
You can now use the new BedrockAgentFunctionResolver
to register tools and handle requests in your Lambda functions. The resolver will automatically parse the request, route it to the appropriate function, and return a well-formed response that includes the tool's output and any existing session attributes.
By default, errors are handled gracefully and returned to the agent with error type and message information, allowing the conversation to continue. This is useful when you want to let the LLM handle errors and reduce boilerplate error-handling code.
If you need more control over error scenarios, you can use BedrockFunctionResponse
to customize the response and determine if the conversation should continue:
You can also use the BedrockFunctionResponse
when you want to enrich the response with session attributes or knowledge base configurations, or when you want the agent to re-prompt the user to provide additional information.
Changes
πNew features and non-breaking changes
- feat(bedrock_agent): add new Amazon Bedrock Agents Functions Resolver (#6564) by @anafalcao
- feat(event_handler): enable support for custom deserializer to parse the request body (#6601) by @LucasCMFBraga
π Documentation updates
- docs(public_reference): add Instil as a public reference (#6763) by @leandrodamascena
π Bug and hot fixes
- fix(event_handler): fix OpenAPI schema response for disabled validation (#6720) by @leandrodamascena
π§ Maintenance
- chore(deps-dev): bump boto3-stubs from 1.38.28 to 1.38.29 (#6764) by @dependabot[bot]
- chore(deps): bump mkdocstrings-python from 1.16.11 to 1.16.12 (#6765) by @dependabot[bot]
- chore(deps): bump mkdocstrings-python from 1.16.11 to 1.16.12 in /docs (#6768) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.200.0a0 to 2.200.1a0 (#6766) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.200.0 to 2.200.1 (#6767) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.199.0a0 to 2.200.0a0 (#6758) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.38.27 to 1.38.28 (#6756) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.35.3 to 1.35.4 (#6755) by @dependabot[bot]
- chore(deps-dev): bump pytest from 8.3.5 to 8.4.0 (#6757) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.38.26 to 1.38.27 (#6747) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1017.0 to 2.1017.1 (#6748) by @dependabot[bot]
- chore(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.2 (#6746) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.38.25 to 1.38.26 (#6742) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.11.11 to 0.11.12 (#6741) by @dependabot[bot]
- chore(deps): bump redis from 6.1.0 to 6.2.0 (#6736) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.38.23 to 1.38.25 (#6735) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1016.1 to 2.1017.0 (#6734) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.198.0a0 to 2.199.0a0 (#6729) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.198.0 to 2.199.0 (#6731) by @dependabot[bot]
- chore(deps): bump mkdocstrings-python from 1.16.10 to 1.16.11 (#6724) by @dependabot[bot]
- chore(deps-dev): bump pytest-xdist from 3.6.1 to 3.7.0 (#6730) by @dependabot[bot]
- chore(deps): bump mkdocstrings-python from 1.16.10 to 1.16.11 in /docs (#6722) by @dependabot[bot]
- chore(deps-dev): bump pytest-mock from 3.14.0 to 3.14.1 (#6723) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.197.0a0 to 2.198.0a0 (#6715) by @dependabot[bot]
- chore(deps): bump datadog-lambda from 6.109.0 to 6.110.0 (#6714) by @dependabot[bot]
- chore(deps-dev): bump coverage from 7.8.1 to 7.8.2 (#6713) by @dependab 6DCB ot[bot]
- chore(deps-dev): bump boto3-stubs from 1.38.22 to 1.38.23 (#6712) by @dependabot[bot]
- chore(deps): bump pydantic from 2.11.4 to 2.11.5 (#6711) by @dependabot[bot]
- chore(ci): add missing dependency to build docs (#6717) by @leandrodamascena
- chore(docs): Add llms.txt to documentation (#6693) by @hjgraca
- chore(deps-dev): bump cfn-lint from 1.35.1 to 1.35.3 (#6708) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.11.10 to 0.11.11 (#6706) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.38.21 to 1.38.22 (#6707) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1016.0 to 2.1016.1 (#6703) by @dependabot[bot]
- chore(deps-dev): bump coverage from 7.8.0 to 7.8.1 (#6701) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.196.1a0 to 2.197.0a0 (#6700) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.196.1 to 2.197.0 (#6699) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.38.19 to 1.38.21 (#6698) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.196.0 to 2.196.1 (#6695) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.196.0a0 to 2.196.1a0 (#6694) by @dependabot[bot]
This release was made possible by the following contributors:
@LucasCMFBraga, @anafalcao, @dependabot[bot], @github-actions[bot], @hjgraca, @leandrodamascena, dependabot[bot] and github-actions[bot]