aws-s3-presigned-urls-react
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
-
Clone the repository
-
Install the dependencies
npm run setup
- Create the CDK stack
npm run cdk-create-stack
-
Open the AWS Console and the stack should be created in your default region
-
Start the react application and open
http://localhost:3000
. Note: it's important that you run the react application onhttp://localhost:3000
, because that's the url we've set up CORS for.
npm run dev
- Cleanup
npm run cdk-destroy