Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Archives for cloudfront

January 11, 2020

Use Object Versioning With CloudFront

If you are using AWS CloudFront, you can avoid costly invalidations by using object versioning. Due to the nature of CloudFront, overwriting to the same file will not have any effect until caching is invalidated. The default timeout for CloudFront is 24 hours. If you have a website and you’ve overwritten your logo image, the updated image file will not be reflected on your site due to the caching timeout is 24 hours. To avoid invalidation, enable object versioning by adding a policy when overwriting files.

# Logo Image
<a href="logo.png">Website Logo</a>
#
# Implement object versioning. 
# Increase the filename after each logo change.
#
<a href="logo-001.png">Website Logo</a>
<a href="logo-002.png">Website Logo</a>
<a href="logo-003.png">Website Logo</a>
<a href="logo-004.png">Website Logo</a>

# Logo Image <a href="logo.png">Website Logo</a> # # Implement object versioning. # Increase the filename after each logo change. # <a href="logo-001.png">Website Logo</a> <a href="logo-002.png">Website Logo</a> <a href="logo-003.png">Website Logo</a> <a href="logo-004.png">Website Logo</a>

Each time the logo is updated, change the filename to avoid CloudFront invalidation.

June 30, 2019

CloudFront XML Error

If you’re seeing an XML error, check the default root object in your CloudFront distribution.

CloudFront distribution setting

It should be set to your index page.

January 4, 2019

CloudFront SSL Certificates

If you have SSL on your website, you can import your own SSL certificates into CloudFront, which is a content delivery network service by AWS. You will need to work a few AWS services to get it working.

  • CloudFront – create a distribution
  • Route 53 – create a hosted zone and add a CNAME
  • Certificate Manager – import your SSL certificate

Finally, on the WordPress side, enable the use CloudFront in your SuperCache plugin.

Seems simple, but you’ll need some patience to get it working.

Look at your HTML source to see if your CDN is really working.

  • 1
  • 2
  • Next Page »
  • Cloud
  • Linux
  • Git

Copyright © 2012–2021