Not able to disable and delete a CloudFront distribution

0

When I attempt to disable an existing CloudFront Distribution, I receive the following error in red:

"Failed: The If-Match version is missing or not valid for the resource."

Afterwards, I also tried to delete the CloudFront Distribution, but I receive the following error in red:

"Failed to delete distribution: The If-Match version is missing or not valid for the resource."

After attempting to delete the distribution, the distribution returns to an "Enabled" state.

Error-messages

How can I permanently delete this distribution and resolve this issue?

asked 2 years ago928 views
1 Answer
0

Some web browser extensions (add-ons), for example ClearURLs, remove ETag headers, which causes updates to fail. To update your distribution, disable this browser extension or turn off ETag filtering.

Also, This error occurs because you need to first get the current distribution config with cloudfront.getDistributionConfig and then copy the ETag and DistributionConfig fields into your cloudfront.updateDistribution call. You modify the DistributionConfig as needed to achieve the actual config update you're trying to do.

Hope this helps, please click Accept answer if it helped you resolve the issue.

profile pictureAWS
SUPPORT ENGINEER
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions