Title: Massive Cloudfront Charges
Last modified: March 4, 2020

---

# Massive Cloudfront Charges

 *  [humpinghummer](https://wordpress.org/support/users/humpinghummer/)
 * (@humpinghummer)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/massive-cloudfront-charges/)
 * So, after setting up cloudfront CDN on W3 Total cache, overnight the plug used
   99 million invalidations in 24hrs which ran up a bill of over $500. My site only
   has 45 posts !
 * $0.000 per URL – first 1,000 URLs / month.1,000.000 URL$0.00
    $0.005 per URL –
   over 1,000 URLs / month.99,919.000 URL$499.60

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/massive-cloudfront-charges/#post-12506738)
 * Hello [@humpinghummer](https://wordpress.org/support/users/humpinghummer/)
 * Thank you for your review and I am sorry about the issue you are experiencing
   with CF invalidations.
    Cloudflare doesn’t charge for “request”, but for invalidation
   path. [https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#PayingForInvalidation](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#PayingForInvalidation)
   The first 1,000 invalidation paths that you submit per month are free; you pay
   for each invalidation path over 1,000 in a month. An invalidation path can be
   for a single file (such as /images/logo.jpg) or for multiple files (such as /
   images/*). A path that includes the * wildcard counts as one path even if it 
   causes CloudFront to invalidate thousands of files. so you can: invalidate all
   your images per-case basis, i.e. https//my-host/wp-content/uploads/2019/01/my-
   jan-image1.jpg https//my-host/wp-content/uploads/2019/01/my-jan-image2.jpg https//
   my-host/wp-content/uploads/2019/02/my-feb-image1.jpg that will be charged as 
   3 paths and that’s what w3tc does. 2. invalidate everything. that’s what w3tc’s
   purge all button does. all objects will be removed from cache so your traffic
   will grow and performance temporarily decline. also, of course, you have to do
   it once after multiple posts updated, otherwise, if you purge after each change
   you’ll get the worse situation in the end (3 invalidate-all requests for 3 posts).
   3. invalidate grouped based on knowing what you’ve modified. in the example below,
   you may invalidate one of: 3.1 https//my-host/wp-content/uploads/2019/* – one
   path, will invalidate all 2019 images only 3.2 https//my-host/wp-content/uploads/
   2019/01/*, https//my-host/wp-content/uploads/2019/02/* – 2 paths, but will invalidate
   only all 2019 jan and feb images. Can you please share what settings you have
   enabled in Peformance>CDN. there is an option “Only Purge CDN manually” in the
   advanced section. Is that option enabled? Thank you!
 *  Thread Starter [humpinghummer](https://wordpress.org/support/users/humpinghummer/)
 * (@humpinghummer)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/massive-cloudfront-charges/#post-12521477)
 * Hi,
 * Thankfully amazon came though and refunded the charge as they could see it was
   not a normal amount of traffic for my account 😉
 * I had Only Purge CDN manually un-ticked.
    However I think the plugin should have
   some form of protection from this happening, some sort of throttle or alert.
 * I think it might have happened becuase I upgraded the WP template and it re generated
   the thumbnails, but 100m is still way of the scale.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Massive Cloudfront Charges’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [humpinghummer](https://wordpress.org/support/users/humpinghummer/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/massive-cloudfront-charges/#post-12521477)