• Skip to primary navigation
  • Skip to main content
  • Skip to footer

lawsie

The long-term storage silo of a human mind

  • Andrew Culture
  • Now Playing on Classic FM
  • Now Playing on 6 Music
  • Buy me a pint
You are here: Home / jekyll / Jekyll site hosted on CloudFront & S3 not updating

Jekyll site hosted on CloudFront & S3 not updating

Published February 23, 2018 by lawsie Leave a Comment

Last Updated on February 23, 2023

Go to your CloudFront distribution and invalidate the cache

One of the problems that had be really scratching my head when I first starting deploying my Jekyll sites to Amazon S3 was that the buggers didn’t seem to update. I would get the updates I wanted working locally and when I deployed the Jeckyll site to my S3 bucket the public site of the site wouldn’t update.

The Symptom I use the s3_website plugin to deploy to S3 and it’s pretty good with error messages. If a deploy doesn’t work then you’ll get an error message. Simples. What was frustrating was that I was getting no error messages from my S2_website deploys, but the front end of my site wasn’t updating.

The problem I found out that because my Jekyll site is served by Amazon CloudFront the problem was probably related to the CloudFront cache. One of the quirks of CloudFront is that when you update assets in a site (pages, pages, whatever) and don’t change the asset name then CloudFront will pretty much ignore that asset and not distribute it for a while. For example, if you make changes to your Jekyll config file and commit it, then you might not see the changes you’ve made for a while.

The fact CloudFront doesn’t automatically, instantly, purge items from cache when they are updated comes under the category of ‘things I wish I had known before troubleshooting CloudFront.

How to purge the whole CloudFront distribution of your Jekyll

Fortunately clearing the entire cache of your CloudFront facilitated Jekyll site is fairly easy. Go to your distribution in CloudFront, click the tab labelled ‘Invalidations’, then click the ‘Create Invalidation’ button. Next shove a * wildcard character in the box labelled ‘Object Path’, then click the invalidate button at the bottom of the dialogue box.

After a few seconds the status of the Invalidation will show as ‘complete’. Now when you check your front end it should be up to date.

Theoretically Amazon will charge you for purging but only if you purge more than 5,000 times a month! So I shouldn’t worry too much…

If you would like more detailed instructions I recommend you take a look at this guide on ColaWeb

Related from lawsie.com

  • Using CloudFront to set Amazon S3 permissions policy
  • Jekyll error – access denied
  • Connecting your Jekyll domain name to CloudFront
  • Setting up SSL with Amazon S3 hosted Jekyll
  • Set up Jekyll on S3 / CloudFront without www
  • My base Jekyll hosting configuration

Filed Under: jekyll Tagged With: Amazon Hosting Issues, jekyll

Have you found this content useful?

Buy me a pint

This website isn't packed with obnoxious advertising but it does cost money to keep alive. Every little donation is a big help!

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Footer

Things I’m currently working on

  • Laws Jet Stream – Jet washing services
  • I’m currently building WebCaretakers.com, a hub of practical calculators for things I get asked about a lot.

Copyright © 2026 · Site wholly owned by Andrew Laws Associates Ltd | I also own and operate webcaretakers.com

SEO by Yeseo

  • Home
  • Observations
  • Consumer Info
  • Tech
  • Andrew Culture
  • Musician Stuff
  • ‘kin useful online calculators from WebCareTakers
  • Chilli sauce
  • Graveyard
  • About me
  • Privacy Policy
  • Cookies
  • Disclaimer
  • Contact me
  • Buy me a pint