Create a REST API as an Amazon S3 proxy in Amazon API Gateway

Amazon API Gateway → Amazon S3 bucket → AWS Lambda

This pattern creates REST API via API Gateway, acting as an S3 proxy for write operations.

This setup orchestrates the deployment of a REST API using Amazon API Gateway, acting as an Amazon S3 proxy for write operations. It includes API-Key setup, basic request validator, AWS Lambda invocation on S3 events, and enables CloudWatch Logs and X-Ray tracing for API Gateway and Lambda using the Powertools for AWS Lambda developer toolkit.

< 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 serverless-patterns/apigw-s3-lambda-sls-py

Deploy

serverless deploy --verbose


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: serverless remove --verbose.

Created by:

Balasubrahmanya Balakrishna

Balasubrahmanya Balakrishna

Senior Lead Software Engineer, Capital One Services, LLC.

Follow on LinkedIn