This sample includes a continuous deployment pipiline for websites built with React. We use AWS CodePipeline, CodeBuild, and SAM to deploy the application. To deploy the application to S3 using SAM we use a custom CloudFormation resource.
buildspec.yml
: YAML configuration for CodeBuild, this file should be in the root of your code repositoryconfigure.js
: Script executed in the build step to generate a config.json file for the application, this is used to include values exported by other CloudFormation stacks (separate services of the same application).index.js
: Custom CloudFormation resource that publishes the website to an S3 bucket. As you can see from the buildspec and SAM template, this function is located in as3-deployment-custom-resource
sub-folder of the repoapp-sam.yaml
: Serverless Application model YAML file. This configures the S3 bucket and the cu