Skip to content

Repository for an article at https://bobbyhadz.com/blog/aws-s3-presigned-url-react - for how to upload files to an S3 bucket in a React.js application using AWS CDK to provision the infrastructure with a single command

Notifications You must be signed in to change notification settings

bobbyhadz/aws-s3-presigned-urls-react

Repository files navigation

Upload files to S3 via presigned URLs from a React.js appliaction

A repository for an article on bobbyhadz.com that shows how to upload files from a react.js frontend to an s3 bucket using presigned post urls. The infrastructure is provisioned using CDK.

How to Use

  1. Clone the repository

  2. Install the dependencies

npm run setup
  1. Create the CDK stack
npm run cdk-create-stack
  1. Open the AWS Console and the stack should be created in your default region

  2. Start the react application and open http://localhost:3000. Note: it's important that you run the react application on http://localhost:3000, because that's the url we've set up CORS for.

npm run dev
  1. Cleanup
npm run cdk-destroy

About

Repository for an article at https://bobbyhadz.com/blog/aws-s3-presigned-url-react - for how to upload files to an S3 bucket in a React.js application using AWS CDK to provision the infrastructure with a single command

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published