This post walks through building a CI/CD pipeline on AWS to automatically deploy a static website using S3, CloudFront, CodePipeline, and CodeBuild.
- •Amazon S3 hosts the static website files with public read access configured via a bucket policy
- •AWS CodeBuild builds and packages the site using a buildspec.yml file defined in the repository root
- •AWS CodePipeline orchestrates the full deployment flow triggered automatically by commits to the GitHub repository
- •Amazon CloudFront distributes the site globally; cache invalidation is automated in the post_build phase via the cloudfront:CreateInvalidation API action
- •The CodeBuild service role must be granted the cloudfront:CreateInvalidation permission, and the CloudFront distribution ID is passed as an environment variable
This summary was automatically generated by AI based on the original article and may not be fully accurate.