[{"data":1,"prerenderedAt":50},["ShallowReactive",2],{"pattern-apigw-resource-pol-sam":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":11,"deploy":13,"description":16,"extension":17,"framework":18,"gitHub":19,"highlight":6,"introBox":25,"language":31,"level":32,"meta":33,"patternArch":34,"resources":39,"s3URL":44,"services":6,"stem":45,"testing":46,"videoId":6,"__hash__":49},"patterns\u002Fpatterns\u002Fapigw-resource-pol-sam.json","Amazon API Gateway with Resource Policy",null,{"text":8},[9,10],"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>",[12],"content\u002Fcontributors\u002Falbert-blaya.json",{"text":14},[15],"sam deploy --guided","Create a REST API Gateway with a Resource Policy for access control","json","AWS SAM",{"template":20},{"projectFolder":21,"repoURL":22,"templateURL":23,"templateFile":24},"apigw-resource-policy","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-resource-policy","serverless-patterns\u002Fapigw-resource-policy","template.yaml",{"headline":26,"text":27},"How it works",[28,29,30],"This pattern deploys an Amazon API Gateway REST API endpoint that uses a Resource Policy for access control.","The Resource Policy explicitly blacklists a list of IP ranges and also explicitly whitelists another list of IP ranges.","If allowed by the Resource Policy, API Gateway will forward the request to a Lambda function which will output the received event object.","Node.js","100",{},{"icon1":35},{"x":36,"y":36,"service":37,"label":38},50,"apigw","API Gateway REST API",{"bullets":40},[41],{"text":42,"link":43},"Controlling access to an API with API Gateway resource policies","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fapigateway-resource-policies.html","https:\u002F\u002Fda-public-assets.s3.amazonaws.com\u002Fpatterns\u002Fapigw-resource-pol-sam\u002Fcloudformation.yml","patterns\u002Fapigw-resource-pol-sam",{"text":47},[48],"See the GitHub repo for detailed testing instructions.","XmnJ9uer3jFgYiNX3vxJFGiCwaaV-euyg88qq1YXYwE",1778846882543]