[{"data":1,"prerenderedAt":60},["ShallowReactive",2],{"pattern-apigw-lambda-cors-nonproxy-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":30,"level":31,"meta":32,"patternArch":33,"resources":47,"s3URL":6,"services":6,"stem":55,"testing":56,"videoId":6,"__hash__":59},"patterns\u002Fpatterns\u002Fapigw-lambda-cors-nonproxy-sam-python.json","Amazon API Gateway REST API with AWS Lambda non-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 non-proxy integration and CORS enabled for GET and OPTIONS methods","json","AWS SAM",{"template":19},{"projectFolder":20,"repoURL":21,"templateURL":22,"templateFile":23},"apigw-cors-nonproxy","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-cors-nonproxy","serverless-patterns\u002Fapigw-cors-nonproxy","template.yaml",{"headline":25,"text":26},"How it works",[27,28,29],"A REST API is created that has a GET method with a Lambda function integration.","The API also has an OPTIONS method with a MOCK integration","CORS is enabled for both GET and OPTIONS method i.e. 'Access-Control-Allow-Methods', 'Access-Control-Allow-Headers', 'Access-Control-Allow-Origin' headers are returned.","Python","200",{},{"icon1":34,"icon2":39,"line1":43},{"x":35,"y":36,"service":37,"label":38},20,50,"apigw","API Gateway REST API",{"x":40,"y":36,"service":41,"label":42},80,"lambda","AWS Lambda",{"from":44,"to":45,"label":46},"icon1","icon2","Non-proxy",{"bullets":48},[49,52],{"text":50,"link":51},"Enabling CORS for a REST API resource","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fhow-to-cors.html",{"text":53,"link":54},"Testing CORS","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fapigateway-test-cors.html","patterns\u002Fapigw-lambda-cors-nonproxy-sam-python",{"text":57},[58],"See the GitHub repo for detailed testing instructions.","zhVAojvVgDH4CWMuJhGMO6zW88vAXQKHcgSWch2Ov3o",1778846882167]