[{"data":1,"prerenderedAt":92},["ShallowReactive",2],{"pattern-strands-agentcore-lambda":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":18,"extension":19,"framework":20,"gitHub":21,"highlight":6,"introBox":27,"language":37,"level":38,"meta":39,"patternArch":40,"resources":70,"s3URL":6,"services":6,"stem":87,"testing":88,"videoId":6,"__hash__":91},"patterns\u002Fpatterns\u002Fstrands-agentcore-lambda.json","Serverless AI Agent Gateway with Strands SDK and AgentCore",null,{"text":8},[9],"aws cloudformation delete-stack --stack-name serverless-ai-agent-gateway-test --region us-east-1",[11],"content\u002Fcontributors\u002Fmike-hume.json",{"text":13},[14,15,16,17],"python3 infrastructure\u002Fdeploy_stack.py","python3 deploy_all.py","python3 create_cognito_user.py","python3 test_e2e_flow.py","Serverless AI agent using Strands SDK and AgentCore Gateway MCP with Bedrock, featuring Cognito JWT auth and end-to-end user context propagation.","json","AWS CloudFormation",{"template":22},{"repoURL":23,"templateURL":24,"projectFolder":25,"templateFile":26},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fstrands-agentcore-lambda","serverless-patterns\u002Fstrands-agentcore-lambda","strands-agentcore-lambda","infrastructure\u002Fcloudformation-template.yaml",{"headline":28,"text":29},"How it works",[30,31,32,33,34,35,36],"The user authenticates with Amazon Cognito and receives a JWT access token.","The JWT is passed to an Agent Lambda which uses the Strands Agents SDK to create an AI agent backed by Amazon Bedrock (us.anthropic.claude-sonnet-4-6).","The Strands Agent connects to an AgentCore Gateway MCP endpoint, dynamically discovering available tools via the MCP tools\u002Flist protocol.","The AgentCore Gateway validates the JWT token using a CUSTOM_JWT authorizer backed by Cognito.","A Request Interceptor Lambda extracts JWT claims (user_id, username, client_id) and injects them as user_context into the MCP tool arguments.","The Tool Lambda executes AWS operations (e.g. S3 ListBuckets) with full user attribution, ensuring every action is traceable to the originating user.","The Strands SDK handles the full agentic loop: tool discovery, Claude tool selection, MCP tool execution, and response formatting — all in a single agent() call.","Python","300",{},{"icon1":41,"icon2":46,"icon3":50,"icon4":54,"icon5":57,"line1":61,"line2":64,"line3":66,"line4":68},{"x":42,"y":43,"service":44,"label":45},10,50,"cognito","Amazon Cognito",{"x":47,"y":43,"service":48,"label":49},30,"lambda","Lambda(Agent)",{"x":51,"y":43,"service":52,"label":53},52,"bedrock","AgentCore Gateway",{"x":55,"y":43,"service":48,"label":56},73,"Lambda(Tool)",{"x":58,"y":43,"service":59,"label":60},90,"s3","Amazon S3",{"from":62,"to":63},"icon1","icon2",{"from":63,"to":65},"icon3",{"from":65,"to":67},"icon4",{"from":67,"to":69},"icon5",{"bullets":71},[72,75,78,81,84],{"text":73,"link":74},"Strands Agents SDK","https:\u002F\u002Fgithub.com\u002Fstrands-agents\u002Fsdk-python",{"text":76,"link":77},"Amazon Bedrock AgentCore Gateway","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock-agentcore\u002Flatest\u002Fdevguide\u002Fgateway.html",{"text":79,"link":80},"Model Context Protocol (MCP)","https:\u002F\u002Fmodelcontextprotocol.io\u002F",{"text":82,"link":83},"Amazon Cognito JWT Authentication","https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Famazon-cognito-user-pools-using-tokens-verifying-a-jwt.html",{"text":85,"link":86},"Amazon Bedrock Cross-Region Inference","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock\u002Flatest\u002Fuserguide\u002Finference-profiles-support.html","patterns\u002Fstrands-agentcore-lambda",{"text":89},[90],"See the README for detailed testing and end-to-end validation instructions.","qQiS7MyZL08S6DO06pN8BrkPG6KNuk0QwzrNZeKRd7M",1782210920227]