[{"data":1,"prerenderedAt":63},["ShallowReactive",2],{"pattern-apigw-s3-proxy":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":51,"s3URL":6,"services":6,"stem":56,"testing":57,"videoId":6,"__hash__":62},"patterns\u002Fpatterns\u002Fapigw-s3-proxy.json","Amazon API Gateway with an Amazon S3 integration",null,{"text":8},[9],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fvamsi-pulikonda.json",{"text":13},[14],"Deploy the stack: \u003Ccode>sam deploy\u003C\u002Fcode>.","Create a REST API Gateway with a S3 read-only integration","json","AWS SAM",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-s3-proxy","serverless-patterns\u002Fapigw-s3-proxy","apigw-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 in Folders and Sub-folders {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 is API Gateway effectively acts as a proxy S3, every GET method is protected by IAM authentication to prevent public access.","Integration","200",{},{"icon1":38,"icon2":43,"line1":47},{"x":39,"y":40,"service":41,"label":42},30,50,"apigw","Amazon API Gateway REST API",{"x":44,"y":40,"service":45,"label":46},80,"s3","Amazon S3",{"from":48,"to":49,"label":50},"icon1","icon2","",{"bullets":52},[53],{"text":54,"link":55},"REST API with S3 integration","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fintegrating-api-with-aws-services-s3.html","patterns\u002Fapigw-s3-proxy",{"text":58},[59,60,61],"Once the application is deployed, retrieve the API URL provided as output and open it in a browser page.","Replace the folder and item place holder with S3 bucket name and path to your file","Example: https:\u002F\u002F12345abcde.execute-api.{region}.amazonaws.com\u002FProd\u002Fmybucket\u002Ffolder1\u002Ffolder2\u002Findex.html","ThkWtnC88Obwafe3Oofimlz0IChNYgknSQySfznKROk",1781606111026]