[{"data":1,"prerenderedAt":61},["ShallowReactive",2],{"pattern-apigw-custom-resource-policy":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":15,"extension":16,"framework":17,"gitHub":18,"highlight":6,"introBox":24,"language":28,"level":29,"meta":30,"patternArch":31,"resources":45,"s3URL":6,"services":6,"stem":56,"testing":57,"videoId":6,"__hash__":60},"patterns\u002Fpatterns\u002Fapigw-custom-resource-policy.json","Amazon API Gateway with a custom resource policy limiting responses to a date range",null,{"text":8},[9],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Feric-johnson.json",{"text":13},[14],"sam deploy","Creates an API Gateway REST endpoint with a resource policy. The resource policy contains a custom policy that limits access to the endpoint to certain date ranges.","json","AWS SAM",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-custom-resource-policy","serverless-patterns\u002Fapigw-custom-resource-policy","apigw-custom-resource-policy","template.yaml",{"headline":25,"text":26},"How it works",[27],"Using resource policies, this endpoint will only accept requests between certain dates. This is just an example of many conditions that can be applied to limit access to API Gateway endpoints with resource policies.","Python","300",{},{"icon1":32,"icon2":37,"line1":41},{"x":33,"y":34,"service":35,"label":36},20,50,"iam","AWS IAM",{"x":38,"y":34,"service":39,"label":40},80,"apigw","Amazon API Gateway",{"from":42,"to":43,"label":44},"icon1","icon2","Resource Policy",{"bullets":46},[47,50,53],{"text":48,"link":49},"API Gateway resource policy statements","https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fsam-property-function-resourcepolicystatement.html",{"text":51,"link":52},"Resource policy condition operators","https:\u002F\u002Fdocs.aws.amazon.com\u002FIAM\u002Flatest\u002FUserGuide\u002Freference_policies_elements_condition_operators.html",{"text":54,"link":55},"Resource policy condition keys","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fapigateway-resource-policies-aws-condition-keys.html","patterns\u002Fapigw-custom-resource-policy",{"text":58},[59],"See the GitHub repo for detailed testing instructions.","rh0Iwnh42VC5hxMyWlpOCWo1J13RMBsSsYMbc4rr3Zo",1779014108611]