Asynchronous Amazon Bedrock AgentCore integration with AWS Lambda durable functions

Lambda durable functions → Amazon Bedrock AgentCore → Lambda durable functions

Orchestrate parallel AI agent invocations on Amazon Bedrock AgentCore using AWS Lambda durable functions with context.map and waitForCallback

This pattern deploys an AWS Lambda durable function that orchestrates a long-running AI agent hosted on Amazon Bedrock AgentCore using the Strands Agents SDK.
The durable function uses context.map to fan out two trip-planning prompts in parallel, each using waitForCallback to pause while the agent processes the request. When both agents complete, the results are combined into a single response.
The agent runs as a containerized Python application on AgentCore, built with the Strands Agents SDK and deployed automatically via CDK. The durable execution SDK checkpoints progress so the workflow is fault-tolerant and resumable.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/lambda-durable-bedrock-agentcore-async

Deploy

npm installcd durable-lambda && npm install && cd ..cdk deploy --all


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stacks: cdk destroy --all.

Created by:

Ben Freiberg

Ben Freiberg

Ben is a Senior Solutions Architect at Amazon Web Services (AWS) based in Frankfurt, Germany.

Follow on LinkedIn