aws-s3-presigned-urls-react icon indicating copy to clipboard operation
aws-s3-presigned-urls-react copied to clipboard

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 wit...

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