Sync built files to a bucket and invalidate a CDN.
Section: Infrastructure and deployment recipes
Deploy static site to S3
makefile
makefile
deploy-web:
aws s3 sync dist/ s3://$(WEB_BUCKET) --delete
aws cloudfront create-invalidation --distribution-id $(DIST_ID) --paths '/*'Explanation
A realistic cloud deployment target.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Infrastructure and deployment recipes