This is probably user error, but I just cannot seem to get this module to work, but it may be me misunderstanding how it works.
So our production site is behind CloudFront. It is a Drupal 9 site on version 9.3.15. I have installed the CloudFront Purger 2.0.0 module, the Purge module and also required aws/aws-sdk-php via composer in my project. I have enabled CloudFront Purger, Purge and Purge UI. I went into the Purge configuration in the admin and added CloudfrontPurge as a purger. I went to my AWS account and created a new user for this specific use and made sure the user had the cloudfront:CreateInvalidation permission. I then retrieved my Secret and Access key for this user along with the Distribution ID and plugged them into the CloudFront Purger config and saved it. Is this all I need to do and now when I save a page, the page will automatically get sent for invalidation? I have everything in place, but when I edit a page, nothing seems to happen. I don't get an error, but nothing at all happens. Nothing shows in the logs as it being sent for invalidation and when I login to my AWS account and go to the invalidations, I don't see any invalidations happening. Am I missing a step? I also tried adding the Purge this page block to my site, but when I click on the button in the block on a page, I get an error saying "No purger supports the type 'url', please install one!".
I did add the CloudFront config keys as environment variables and am setting them in my settings.php like this:
/**
* Settings for CloudFront Purge.
*/
if (getenv('distribution_id')) {
$config['cloudfront_purger.settings']['distribution_id'] = getenv('distribution_id');
}
if (getenv('aws_key')) {
$config['cloudfront_purger.settings']['aws_key'] = getenv('aws_key');
}
if (getenv('aws_secret')) {
$config['cloudfront_purger.settings']['aws_secret'] = getenv('aws_secret');
}
But even if I'm not doing that and I enter those values in manually in the admin, I still get nothing happening. Am I supposed to do something else for this to automatically purge the URL upon saving content?
THANKS