// troubleshooting guide · aws cloudfront

CloudFront Invalidation Not Working (Still Serving Old Content)

Status
Workaround available
platforms:
AWS Console, AWS CLI, CI/CD
updated:
November 17, 2026
reports:
6
Method
how we research
Share

RUNBOOK · aws-cloudfront/invalidation-not-working4 FIXES

// quick answer

If CloudFront still serves old files after an invalidation, the path probably didn't match the cached object, the invalidation hasn't finished, the browser cached the file, or the origin itself still has the old version. Check x-cache/age headers and invalidate /* or use versioned filenames.

Most likely fix: Confirm where the stale copy lives

How to fix it

// try these in order, the most common fix is first

  1. FIX 1Confirm where the stale copy lives

    1. 01Run curl -sI https://your-domain/file and read the x-cache and age headers
    2. 02Hit from cloudfront with a large age = edge cache; Miss from cloudfront and still old = origin problem
    3. 03Check the file in S3 (aws s3 ls with --recursive, or download it) to confirm the new version is there
    Did this fix it?
  2. FIX 2Create the invalidation with a quoted path

    1. 01Run aws cloudfront create-invalidation --distribution-id YOUR_ID --paths "/*" (quotes stop the shell expanding *)
    2. 02Or in the console open Invalidations > Create invalidation and enter /*
    3. 03Remember /* counts as one path; 1,000 paths a month are free, then $0.005 each
    Did this fix it?
  3. FIX 3Wait for it to complete

    1. 01Run aws cloudfront get-invalidation --distribution-id YOUR_ID --id INVALIDATION_ID
    2. 02Wait until Status is Completed (usually a few minutes) before testing
    3. 03Test in a private window to rule out browser cache
    Did this fix it?
  4. FIX 4Use versioned filenames and short HTML TTLs

    1. 01Let your build tool add content hashes to JS/CSS filenames (app.3f2a1.js)
    2. 02Upload index.html with Cache-Control: no-cache or a short max-age
    3. 03Give hashed assets long TTLs; only index.html needs invalidating on deploy
    Did this fix it?

Symptoms

Site shows the old version after a deploy, even though the invalidation shows Completed; some users see new content and others old.

Why it happens

  • C-01Invalidation path doesn't match the object key (case, missing leading slash, query-string variants)
  • C-02Shell expanded /* in the AWS CLI command, so the wrong paths were invalidated
  • C-03Invalidation still in progress across edge locations
  • C-04Browser or service worker cache, controlled by Cache-Control headers
  • C-05Origin (S3 sync, second origin, origin-side cache) still serves the old file

// this guide also covers

  • cloudfront invalidation not working
  • cloudfront serving old content
  • cloudfront cache not updating
  • cloudfront clear cache

Still not working?

If AWS CloudFront keeps failing, you're not alone. See every AWS CloudFront problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us

Watch AWS CloudFront Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

Other AWS CloudFront errors

All 12 AWS CloudFront errors and fixes →