Drupal is a registered trademark of Dries Buytaert

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
2 months ago
Release cadence
29 days
Stability
83% stable

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