Invalidate CloudFront Distribution

DeployBot can invalidate your CloudFront distribution after every deployment when using Amazon S3 deployments. This ensures that Amazon CloudFront servers always have the most recent content. If you have not already, you can read about deploying to Amazon S3 in a separate help article.

Cloudfront permissions we support:

  • cloudfront:CreateInvalidation
  • cloudfront:GetDistribution

How to invalidate CloudFront distribution

If you use DeployBot to deploy files to an S3 bucket, and you also use that bucket as an origin for your CloudFront Distribution, you can use the CloudFront Invalidation feature in DeployBot to automatically invalidate that distribution.

When setting up an Amazon S3 deployment in DeployBot, specify a valid CloudFront distribution ID in the server settings:

DeployBot will take care of the rest. After each deployment it will send a list of changed files to invalidate to your CloudFront distribution. If you’d prefer to always invalidate the entire distribution, please enable the according checkbox. Invalidating files ensures that your CDN always serves the latest versions of your files. After the invalidation was initiated by DeployBot you can track its progress in the CloudFront Management Console.

Still need help? Contact Us Contact Us