refresh cloudfront cache 1

refresh cloudfront cache

aws cloudfront create-invalidation --distribution-id E1B1A4GHK9TTE --paths "/*"

Here is what the above code is Doing:
1. Create a new bucket with the name of the project
2. Set the bucket to be public
3. Set the bucket to be a website
4. Upload the contents of the build folder to the bucket
5. Create a new CloudFront distribution
6. Set the distribution to use the bucket as the origin
7. Set the distribution to be public
8. Invalidate the distribution so that the new files are served

Similar Posts