[{"data":1,"prerenderedAt":58},["ShallowReactive",2],{"pattern-apigateway-rest-s3-sam":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":34,"level":35,"meta":36,"patternArch":37,"resources":47,"s3URL":52,"services":6,"stem":53,"testing":54,"videoId":6,"__hash__":57},"patterns\u002Fpatterns\u002Fapigateway-rest-s3-sam.json","Amazon API Gateway with an Amazon S3 integration",null,{"text":8},[9],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Falbert-blaya.json",{"text":13},[14],"sam deploy --guided --capabilities CAPABILITY_IAM","Create a REST API Gateway with a S3 read-only integration","json","AWS SAM",{"template":19},{"projectFolder":20,"repoURL":21,"templateURL":22,"templateFile":23},"apigw-s3-proxy","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-s3-proxy","serverless-patterns\u002Fapigw-s3-proxy","template.yaml",{"headline":25,"text":26},"How it works",[27,28,29,30,31,32,33],"This pattern deploys an Amazon API Gateway REST API endpoint with a S3 read-only integration","The API exposes 3 GET methods:","- Root GET method: it provides a list of the S3 buckets of the account where the stack is deployed.","- {folder} GET method: it provides a list of the objects contained in the bucket {folder}","- {item} GET method: it returns the contents of the object {item}.","The template also deploys an IAM role with S3 read-only capabilities that is used by API Gateway to integrate with S3.","Since this effectively acts as a proxy to S3, every GET method is protected by IAM authentication to prevent public access.","Integration","200",{},{"icon1":38,"icon2":43},{"x":39,"y":40,"service":41,"label":42},20,50,"apigw","API Gateway REST API",{"x":44,"y":40,"service":45,"label":46},80,"s3","Amazon S3",{"bullets":48},[49],{"text":50,"link":51},"REST API with S3 integration","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fintegrating-api-with-aws-services-s3.html","https:\u002F\u002Fda-public-assets.s3.amazonaws.com\u002Fpatterns\u002Fapigateway-rest-s3-sam\u002Fcloudformation.yml","patterns\u002Fapigateway-rest-s3-sam",{"text":55},[56],"See the GitHub repo for detailed testing instructions.","KEvYBc659bCG2obICfLDuONUtxiEkjSMEvKq_C3g1c0",1778846881529]