Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module automatically invalidates your entire AWS CloudFront cache whenever Drupal content changes, making it suitable for smaller websites that need a simple setup. It assumes your AWS credentials are provided through environment variables or the AWS Metadata Service.

NOTE: AWS CloudFront supports cache based invalidation since April 2026, so I recommend people use the standard purger module with the cloudfront_purger:^2.2 module. This module no longer serves a purpose

About

Module to invalidate the CloudFront cache when Drupal content changes. Suitable for small sites.

How it works

Stand-alone module for CloudFront cache invalidation: as soon as Drupal wants to invalidate the cache, immediately invalidate the entire CloudFront cache. The goal is ease of setup.

Configuration

You cannot provide AWS credentials in this module, we assume your setup has access to credentials either via the AWS Metadata Service or via environment variables.

You usually would set your distribution id in your settings.php like:

$config['cloudfront_invalidate_all.settings']['distribution_id'] = getenv('DISTRIBUTION_ID');

So it is injected via an environment variable. Or you can hard-code it, or save it to config.

Black lists

Many cache invalidation tags are irrelevant and should not clear CloudFront. There's a preconfigured comprehensive black list installed, and this can be changed in the settings form.

Why not use the purge module?

The purge module is very complicated and requires many more bits. Out of the box it does not work for with CloudFront. You can install the CloudFront purger but that will also not help you. The URL queuer addition does not work properly.

So you are left with having to write mappings from Drush cache tags to paths yourself. For smaller sites you don't really need that.

Does this work for large sites?

No. Small sites, thousands of urls are fine. For large sites you want the purge module and write custom code to map cache invalidation tags to CloudFront paths.

Activity

Total releases
6
First release
Jul 2025
Latest release
7 months ago
Releases (12 mo)
6 ▲ from 0
Maintenance
Slowing

Release Timeline

Releases

Version Type Release date
1.2.0 Stable Dec 16, 2025
1.1.2 Stable Sep 26, 2025
1.1.1 Stable Sep 26, 2025
1.1.0 Stable Jul 25, 2025
1.0.0 Stable Jul 23, 2025
1.0.x-dev Dev Jul 22, 2025