AWS CLI removes cloud distribution - InvalidIfMatchVersion

I am trying to uninstall a cloud distribution through the AWS CLI. Performance

aws cloudfront delete-distribution --id <DISTRIBUTION-ID>

I get the following error:

A client error (InvalidIfMatchVersion) occurred when calling the DeleteDistribution operation: 
The If-Match version is missing or not valid for the resource.

I do not quite understand what this error means and how to get around it.

From this documentation, I assume that you must first turn off distribution. But if so - how do I do this with the CLI?

+4
source share
1 answer

, Etag API CloudFront . , , , , - . Etag, .

$aws cloudfront get-distribution-config --id E123456

:

{    "ETag": "ETAGEXAMPLE",

$aws cloud-delete-distribution -id E123456 -if-match ETAGEXAMPLE

" (DistributionNotDisabled) DeleteDistribution: , , ". , , .

+5

All Articles