Deploying create-react-app to S3 and CloudFront

Marc Garreau
Nov 7, 2016 · 6 min read

Deploy to S3

Bonus: Deploying with AWS CLI

AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2
Default output format [None]: json
// create a bucket (if you didn't already)
$ aws s3 mb s3://your-bucket-name
// list buckets
$ aws s3 ls
// build and deploy the app
$ npm run build && aws s3 sync build/ s3://your-bucket-name

Deploy to CloudFront

If it works on S3, why bother with CloudFront?

Wrapping Up

Marc Garreau

Written by

Author of Redux in Action: UX developer at the Ethereum Foundation.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade