January 2019
Intermediate to advanced
490 pages
15h 37m
English
To delete a CloudFront distribution, we need to disable it first. To disable it, we need to use update-distribution, specifying a distribution-config JSON file with all of the existing properties, with the following change:
"Enabled": false,
For the initial JSON file for the update, we can copy and paste the value of DistributionConfig from the get-distribution sub-command response. Note that some properties, such as calling the reference or origin, cannot be updated.
Execute the update-distribution sub-command to disable the distribution.
aws cloudfront update-distribution \ --id E18OUP1REXZHGA \ --if-match EV3RMCDP8DYAA \ --distribution-config file://resources/distr-config-disable.json \ ...
Read now
Unlock full access