Skip to content

CloudFormation template for using pre-signed URLs to upload files to Amazon S3

Notifications You must be signed in to change notification settings

adarrshpaul/PreSignedUrlS3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Pre-signed URLs for Amazon S3 Uploads

This AWS CloudFormation template provides a solution for using pre-signed URLs to upload files to Amazon S3. The solution consists of an S3 bucket, a Lambda function, a DynamoDB table, and an API Gateway to expose the Lambda function as an HTTP API.

Prerequisites

  • An AWS account with the necessary permissions to create the resources defined in this template.
  • A basic understanding of AWS CloudFormation and AWS Lambda.

Getting Started

To use this template, follow these steps:

  1. Create an S3 bucket and replace YOUR_BUCKET_NAME in the CloudFormation template with your bucket name.
  2. Package and upload your Lambda function code to your S3 bucket, and replace YOUR_LAMBDA_FUNCTION_CODE.zip in the CloudFormation template with the name of your Lambda function code file.
  3. Replace YOUR_LAMBDA_FUNCTION_NAME in the CloudFormation template with the name of your Lambda function.
  4. Create a DynamoDB table and replace YOUR_TABLE_NAME in the CloudFormation template with your table name.
  5. Replace YOUR_INDEX_NAME in the CloudFormation template with a unique name for your DynamoDB global secondary index.
  6. Deploy the CloudFormation template to create the necessary resources.

Resources

The following resources are created by this CloudFormation template:

  • S3 bucket: An S3 bucket that is used to store uploaded files.
  • Lambda function: A Lambda function that generates pre-signed URLs for S3 uploads and stores upload metadata in a DynamoDB table.
  • DynamoDB table: A DynamoDB table that is used to store upload metadata.
  • IAM role: An IAM role that grants the Lambda function permissions to access S3 and DynamoDB.
  • API Gateway: An API Gateway that exposes the Lambda function as an HTTP API.

License

This project is licensed under the terms of the MIT license. See LICENSE for more information.

About

CloudFormation template for using pre-signed URLs to upload files to Amazon S3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published