Upload file up to 5GB to Amazon S3 bucket using presigned URL

Amazon API Gateway → AWS Lambda → Amazon S3

This project deploys Amazon API Gateway with AWS Lambda integration. The Java based Lambda function generates presigned S3 URL.

Amazon API Gateway receives the HTTP POST request containing the file name to be uploaded
AWS Lambda is triggered by the API Gateway, this java based function generates Amazon S3 presigned URL.
A Java program is used to upload a file to the Amazon S3 bucket using the pre-signed URL

< 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-lambda-s3-sam-java

Deploy

mvn clean packagesam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the Amazon S3 bucket content: aws s3 rm s3://{MyS3BucketName} --recursive
Delete the stack: sam delete.

Created by:

Biswanath Mukherjee

Biswanath Mukherjee

Sr. Solutions Architect working at AWS India.

Follow on LinkedIn