DEPLOYING A STATIC WEB APPLICATION WITH SERVERLESS AND CODEBUILD
This example uses ReactJS. I initialized the application using
- S3 and CloudFront templates are in
./serverless.yml. It's not using a custom domain.
- CodeBuild template is in
./__deploy/serverless.yml. You need to change hardcoded permission values to your own resources (S3 and CloudFront). Also, change the Github link to your own repo.
- CodeBuild build steps and configurations are in
./build-dev.jsonrespectively. You need to change hardcoded values in
./build-dev.json(S3 and CloudFront).
How to deploy.
sls deployin the root folder
- (Optional) if you want to use CodeBuild, run
- if you use CodeBuild, deploy the website using
yarn deploy:dev. Otherwise, run
yarn buildand upload the content of
./buildfolder to the S3 Bucket.