[{"data":1,"prerenderedAt":95},["ShallowReactive",2],{"pattern-strands-agentcore-apigw":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":12,"deploy":14,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":26,"language":37,"level":38,"meta":39,"patternArch":40,"resources":65,"s3URL":6,"services":6,"stem":88,"testing":89,"videoId":6,"__hash__":94},"patterns\u002Fpatterns\u002Fstrands-agentcore-apigw.json","Serverless AI Weather Agent with AgentCore Gateway and Amazon API Gateway Target",null,{"text":8},[9,10,11],"aws bedrock-agentcore-control delete-api-key-credential-provider --name dev-weather-apigw-key --region us-east-1","sam delete --stack-name dev-weather-agent --region us-east-1 --no-prompts","aws secretsmanager delete-secret --secret-id dev\u002Fapigw-api-key --force-delete-without-recovery --region us-east-1",[13],"content\u002Fcontributors\u002Fmike-hume.json",{"text":15},[16],".\u002Fscripts\u002Fdeploy.sh --environment-name dev --region us-east-1","Serverless AI weather agent using Strands SDK and AgentCore Gateway with an API Gateway target. Uses MCP, Cognito JWT auth, and key-less Open-Meteo.","json","AWS SAM",{"template":21},{"repoURL":22,"templateURL":23,"projectFolder":24,"templateFile":25},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fstrands-agentcore-apigw","serverless-patterns\u002Fstrands-agentcore-apigw","strands-agentcore-apigw","infrastructure\u002Ftemplate.yaml",{"headline":27,"text":28},"How it works",[29,30,31,32,33,34,35,36],"The user authenticates with Amazon Cognito and receives a JWT ID 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 cross-region inference profile).","The Strands Agent connects to an AgentCore Gateway MCP endpoint, dynamically discovering available weather tools via the MCP tools\u002Flist protocol.","AgentCore Gateway auto-discovers operations from the API Gateway REST API via GetExportAPI and presents them as MCP tools to the agent.","The AgentCore Gateway validates the incoming JWT token using a CUSTOM_JWT authorizer backed by Cognito.","When the agent selects a tool, AgentCore routes the request to the API Gateway REST API, authenticating with an API key managed by a credential provider backed by Secrets Manager.","The API Gateway proxies the request to Open-Meteo, a free key-less weather API — one path for geocoding (city name to coordinates) and one for the forecast.","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. For a place name the agent chains both tools: geocode first, then forecast.","Python","300",{},{"icon1":41,"icon2":46,"icon3":50,"icon4":54,"line1":58,"line2":61,"line3":63},{"x":42,"y":43,"service":44,"label":45},10,50,"cognito","Amazon Cognito",{"x":47,"y":43,"service":48,"label":49},35,"lambda","AWS Lambda",{"x":51,"y":43,"service":52,"label":53},60,"bedrock","AgentCore Gateway",{"x":55,"y":43,"service":56,"label":57},85,"apigw","Amazon API Gateway",{"from":59,"to":60},"icon1","icon2",{"from":60,"to":62},"icon3",{"from":62,"to":64},"icon4",{"bullets":66},[67,70,73,76,79,82,85],{"text":68,"link":69},"Strands Agents SDK","https:\u002F\u002Fgithub.com\u002Fstrands-agents\u002Fsdk-python",{"text":71,"link":72},"Amazon Bedrock AgentCore Gateway","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock-agentcore\u002Flatest\u002Fdevguide\u002Fgateway.html",{"text":74,"link":75},"AgentCore Gateway API Gateway Target","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock-agentcore\u002Flatest\u002Fdevguide\u002Fgateway-target-api-gateway.html",{"text":77,"link":78},"Model Context Protocol (MCP)","https:\u002F\u002Fmodelcontextprotocol.io\u002F",{"text":80,"link":81},"Amazon Cognito JWT Authentication","https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Famazon-cognito-user-pools-using-tokens-verifying-a-jwt.html",{"text":83,"link":84},"Amazon Bedrock Cross-Region Inference Profiles","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock\u002Flatest\u002Fuserguide\u002Finference-profiles-support.html",{"text":86,"link":87},"Open-Meteo (free key-less weather API)","https:\u002F\u002Fopen-meteo.com\u002F","patterns\u002Fstrands-agentcore-apigw",{"text":90},[91,92,93],"See the README for detailed testing and end-to-end validation instructions.",".\u002Fscripts\u002Ftest.sh",".\u002Fscripts\u002Ftest.sh 'What is the weather in London, UK?'","RFyFJ01hYdHobO_HcAdhm2gR79UaADT_fmCVTFsLwv0",1784543725005]