[{"data":1,"prerenderedAt":72},["ShallowReactive",2],{"pattern-apigw-iam":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":12,"deploy":14,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":29,"language":34,"level":35,"meta":36,"patternArch":37,"resources":51,"s3URL":63,"services":64,"stem":65,"testing":66,"videoId":28,"__hash__":71},"patterns\u002Fpatterns\u002Fapigw-iam.json","Amazon API Gateway HTTP API to AWS Lambda",null,{"headline":8,"text":9},"Cleanup",[10,11],"1. Delete the stack: \u003Ccode>sam delete --stack-name STACK_NAME\u003C\u002Fcode>.","2. Confirm the stack has been deleted: \u003Ccode>aws cloudformation list-stacks --query \"StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus\"\u003C\u002Fcode>",[13],"content\u002Fcontributors\u002Frafael-liu.json",{"text":15},[16],"sam deploy --guided","Create an Amazon API Gateway REST API with an IAM authorizer","json","AWS SAM",{"template":21,"payloads":26},{"projectFolder":22,"repoURL":23,"templateURL":24,"templateFile":25},"apigw-iam","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-iam","serverless-patterns\u002Fapigw-iam","template.yaml",[27],{"headline":28,"payloadURL":28},"",{"headline":30,"text":31,"test":28},"How it works",[32,33],"This patterns creates a REST API and a Prod stage with a single \u002F resource with a GET method. IAM is configured as the authorization method, and a Lambda integration with is defined with caller credentials enabled.","Two IAM users are created, one to test the correct required permission and another with insufficient permissions. Both contain policies with scoped down actions and resources.","Node.js","200",{},{"icon1":38,"icon2":43,"line1":47},{"x":39,"y":40,"service":41,"label":42},20,50,"apigw","API Gateway REST API",{"x":44,"y":40,"service":45,"label":46},80,"lambda","AWS Lambda",{"from":48,"to":49,"label":50},"icon1","icon2","IAM auth",{"headline":52,"bullets":53},"Additional resources",[54,57,60],{"text":55,"link":56},"Working with HTTP APIs","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fhttp-api.html",{"text":58,"link":59},"Working with AWS Lambda proxy integrations for HTTP APIs","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fhttp-api-develop-integrations-lambda.html",{"text":61,"link":62},"Lambda Function Handler","https:\u002F\u002Fdocs.aws.amazon.com\u002Fwhitepapers\u002Flatest\u002Fserverless-architectures-lambda\u002Fthe-handler.html","https:\u002F\u002Fda-public-assets.s3.amazonaws.com\u002Fpatterns\u002Fapigw-iam\u002Fcloudformation.yml",{"from":41,"to":45},"patterns\u002Fapigw-iam",{"headline":67,"text":68},"Testing",[69,70],"1. Once the application is deployed, retrieve the HttpApiEndpoint value from CloudFormation Outputs. Either browse to the endpoint in a web browser or call the endpoint from Postman.","2. See the repo for additional testing notes.","jiMNhFTtqlkZ56oQWwD3qdJgPX8TAHNQyFbg5tEdCY0",1779273332273]