AWS CLICloudFront

aws cloudfront create-invalidation

Invalidates cached objects in a CloudFront distribution so the next request re-fetches them from the origin.

Syntax

aws cloudfront create-invalidation --distribution-id <id> --paths <paths>

Examples

Invalidate everything after a deploy

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