Amazon API Gateway to Amazon S3 direct proxy with async AWS Lambda processing

API Gateway REST API → Amazon S3 → AWS Lambda

Amazon API Gateway to S3 direct proxy - File upload triggers .NET 8.0 Lambda function

This pattern shows how to create an Amazon API Gateway REST API with a direct proxy to an Amazon S3 bucket. The API allows files to be uploaded to the S3 bucket. An AWS Lambda authorizer authorizes the incoming HTTP requests. The S3 upload asynchronously triggers a Lambda function to process the uploaded file.
An Amazon API Gateway REST API is deployed, one AWS Lambda Authorizer, one Amazon S3 bucket, and one AWS Lambda that will be triggered after a file is uploaded.
The Amazon API Gateway is defined in the AWS Serverless Application Model (SAM) template.yaml file using the OpenAPI specification.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd apigw-direct-s3-lambda-dotnet

Deploy

sam buildsam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete

Created by:

Chris Nelson

Chris Nelson

Sr. Solutions Architect at Amazon Web Services (AWS)

Follow on LinkedIn