This project show how fast we can deploy react app in s3 and cloudfront with serverless framework. Try it and make yours
npm install serverless -g
- Move to ~/.aws/credentials
- Append your AWS PROFILE like this
[my-profile] aws_access_key_id=INSERT YOUR ACCESS KEY aws_secret_access_key=INSERT YOUR SECRET KEY
- Export your profile
export AWS_PROFILE="my-profile"
- Move to react-s3-cloudFront-serverless-template/my-app DIR
yarn build
- Move to react-s3-cloudFront-serverless-template DIR
- Edit serverless.yml The name of the bucket must be unique.
custom: bucketName: Your bucket name
- Now Let's deploy!!
sls deploy
- Wait a minute then you will Success deploy Click Me!
Isn't it super easy? Do not deploy your React app manually! Use the Serverless Framework to deploy automatically!