DEV Community

Discussion on: Host a Website Using AWS CloudFront, Origin Access Identity, S3 without Static Website Hosting

Collapse
 
bugb profile image
bugb

Thank you so much for your tutorial, it is better if you include some image for more readable.

Cloudfront auto downloads and caches your static site to the edge location based on TTL, by default it is 86400 which is equal to 1 day, you can set it to lower or higher than this value.

BTW: Create Invalidation it can cost some fee, and I think better you can create auto deploy script, every time you update your website, it auto push to s3 then run this command to update Create Invalidation:

aws cloudfront create-invalidation --distribution-id <your-distribution-id> --paths '/*'

It very helpful and save your time.

Collapse
 
sanamsoodan profile image
Sanamdeep Singh

That was very informative. I will keep your suggestions in mind next time.Will try and update the current ones as well.