Deploying a React app to S3 and CloudFront is a common task for many developers. This project shows how to do it using Serverless.
- Node.js
- Serverless CLI
- AWS Account
- Clone the repo
- Run
yarn install
- Run
serverless config credentials --provider aws --key YOUR_KEY --secret YOUR_SECRET
- Run
yarn build
- Replace the
bucketName
inserverless.yml
with your own bucket name. Remember that bucket names must be globally unique. - Set environment variables in
serverless.yml
forACM_CERTIFICATE_ARN
,ROUTE53_RECORD_SET_NAME
, andROUTE53_HOSTED_ZONE_ID
- Run
serverless deploy --stage dev --verbose