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