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
preguntada hace 8 meses1131 visualizaciones
1 Respuesta
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
respondido hace 8 meses
  • 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.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas