Deleting a distribution
If you no longer want to use a distribution, you can delete it by using the CloudFront console or by using the CloudFront API.
Be aware that before you can delete a distribution, you must disable it, which requires permission to update the distribution.
Note
If you disable a distribution that has an alternate domain name associated with it, CloudFront stops accepting traffic for that domain name (such as www.example.com), even if another distribution has an alternate domain name with a wildcard (*) that matches the same domain (such as *.example.com).
To delete a CloudFront distribution
Sign in to the AWS Management Console and open the CloudFront console at https://console.aws.amazon.com/cloudfront/v4/home
. -
In the right pane of the CloudFront console, find the distribution that you want to delete.
-
If the value of the State column is Disabled, skip to Step 7.
If the value of State is Enabled and the value of Status is Deployed, continue with Step 4 to disable the distribution before deleting it.
If the value of State is Enabled and the value of Status is InProgress, wait until Status changes to Deployed. Then continue with Step 4 to disable the distribution before deleting it.
-
In the right pane of the CloudFront console, select the check box for the distribution that you want to delete.
-
Choose Disable to disable the distribution, and choose Yes, Disable to confirm. Then choose Close.
Note
Because CloudFront must propagate this change to all edge locations, it might take a few minutes before the update is complete and you can delete your distribution.
-
The value of the State column immediately changes to Disabled. Wait until the value of the Status column changes to Deployed.
-
Check the check box for the distribution that you want to delete.
-
Choose Delete, and choose Yes, Delete to confirm. Then click Close.
Note
If you have just marked your distribution as disabled, CloudFront might still need a few more minutes to propagate that change to the edge locations. Until propagation is complete, the Delete option isn't available.
You can also delete a distribution using the CloudFront API. For more information, see DeleteDistribution in the Amazon CloudFront API Reference.