Bad error message when trying to delete non-existent origin from the CloudFront Distribution

1

Steps

  1. Create S3 bucket
  2. Create CloudFront Distribution

a. Use S3 bucket as an origin

b. Create CloudFront Distribution

  1. Delete S3 bucket
  2. Open Distribution created before
  3. Go to Origins
  4. Click on radio button to the left from origin
  5. Press Delete button above, Press delete again on the confirmation screen

Actual result: Error message:

Failed to delete origin: 1 validation error detected: Value '[]' at 'distributionConfig.origins.items' failed to satisfy constraint: Member must have length greater than or equal to 1

error message

Expected result: Human Readable error message.

Denis
已提問 8 個月前檢視次數 1131 次
1 個回答
2

As mentioned in the CloudFront API Reference, CloudFront requires at least one origin when you create or update a distribution, and it doesn't matter whether your origin exists or not.

If you want to delete a non-existing origin, you need to add a new origin first, then delete the old one.

profile picture
HS
已回答 8 個月前
  • It's clear, the behavior is correct. The problem is only with the bad error message.

  • Then you can contact AWS Support and send a request to improve the error message if you have a better one.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南