[{"data":1,"prerenderedAt":59},["ShallowReactive",2],{"pattern-apigw-lambda-cors-proxy-sam-python":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":29,"level":30,"meta":31,"patternArch":32,"resources":46,"s3URL":6,"services":6,"stem":54,"testing":55,"videoId":6,"__hash__":58},"patterns\u002Fpatterns\u002Fapigw-lambda-cors-proxy-sam-python.json","Amazon API Gateway REST API with AWS Lambda proxy integration and CORS enabled",null,{"text":8},[9],"Delete the stack: \u003Ccode>cdk delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fnoor-bari.json",{"text":13},[14],"sam deploy","API Gateway REST API with Lambda proxy integration","json","AWS SAM",{"template":19},{"projectFolder":20,"repoURL":21,"templateURL":22,"templateFile":23},"apigw-cors-proxy","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-cors-proxy","serverless-patterns\u002Fapigw-cors-proxy","template.yaml",{"headline":25,"text":26},"How it works",[27,28],"A REST API is created that has a GET method with a Lambda integration where API Gateway returns the CORS headers.","The API also has an OPTIONS method with a Lambda proxy integration where the backend Lambda function returns the CORS headers.","Python","200",{},{"icon1":33,"icon2":38,"line1":42},{"x":34,"y":35,"service":36,"label":37},20,50,"apigw","API Gateway REST API",{"x":39,"y":35,"service":40,"label":41},80,"lambda","AWS Lambda",{"from":43,"to":44,"label":45},"icon1","icon2","Proxy",{"bullets":47},[48,51],{"text":49,"link":50},"Enabling CORS for a REST API resource","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fhow-to-cors.html",{"text":52,"link":53},"Testing CORS","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fapigateway-test-cors.html","patterns\u002Fapigw-lambda-cors-proxy-sam-python",{"text":56},[57],"See the GitHub repo for detailed testing instructions.","R-AjsGzT4JLMXvyJHfm6o_cPH7tN1aGg8X44-9I23Kk",1780914906622]