From 39bad1abe364e96b38c0e226f2e21f9bc2991357 Mon Sep 17 00:00:00 2001 From: Ben <9841563+bfreiberg@users.noreply.github.com> Date: Tue, 13 Aug 2024 22:11:47 +0200 Subject: [PATCH] Add final pattern file --- apigw-s3-proxy/apigw-s3-proxy.json | 79 ++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 apigw-s3-proxy/apigw-s3-proxy.json diff --git a/apigw-s3-proxy/apigw-s3-proxy.json b/apigw-s3-proxy/apigw-s3-proxy.json new file mode 100644 index 000000000..f11e35aff --- /dev/null +++ b/apigw-s3-proxy/apigw-s3-proxy.json @@ -0,0 +1,79 @@ +{ + "title": "Amazon API Gateway with a Amazon S3 integration", + "description": "Create a REST API Gateway with a S3 read-only integration", + "language": "", + "level": "200", + "framework": "SAM", + "introBox": { + "headline": "How it works", + "text": [ + "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." + ] + }, + "gitHub": { + "template": { + "repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/apigw-s3-proxy", + "templateURL": "serverless-patterns/apigw-s3-proxy", + "projectFolder": "apigw-s3-proxy", + "templateFile": "template.yaml" + } + }, + "resources": { + "bullets": [ + { + "text": "REST API with S3 integration", + "link": "https://docs.aws.amazon.com/apigateway/latest/developerguide/integrating-api-with-aws-services-s3.html" + } + ] + }, + "deploy": { + "text": [ + "Deploy the stack: sam deploy." + ] + }, + "testing": { + "text": [ + "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://12345abcde.execute-api.{region}.amazonaws.com/Prod/mybucket/folder1/folder2/index.html" + ] + }, + "cleanup": { + "text": [ + "Delete the stack: sam delete." + ] + }, + "authors": [ + { + "name": "Vamsi Pulikonda", + "image": "https://raw.githubusercontent.com/vamsipulikonda/my-photo/main/vamsi-photo.jpg", + "bio": "I am a cloud computing enthusiast working as a Cloud Engineer at Amazon Web Services.", + "linkedin": "vamsipulikonda" + } + ], + "patternArch": { + "icon1": { + "x": 20, + "y": 50, + "service": "apigw", + "label": "API Gateway REST API" + }, + "icon2": { + "x": 80, + "y": 50, + "service": "s3", + "label": "Amazon S3" + }, + "line1": { + "from": "icon1", + "to": "icon2", + "label": "" + } + } +}