Public S3 bucket (web server) returns 404

0

I have an S3 bucket configured as a public web server. When I visit the AWS generated URI for the bucket from a browser, the webpage shows up fine. However, I have a CNAME record in my DNS name server with a record <subdomain>.<mydomain>.com that points to this AWS generated URI. When the browser is visiting this subdomain URI, I get an error from S3 that says: 404 Not Found

Code: NoSuchBucket Message: The specified bucket does not exist BucketName: <my subdomain URI>

NRaj
preguntada hace 10 meses506 visualizaciones
1 Respuesta
0

Do the values in the CNAME record match the name of the S3 bucket?
For example, if the value of the CNAME record is "example.com", the name of the S3 bucket must also be "example.com".
https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#VirtualHostingCustomURLs

Your bucket name must be the same as the CNAME. For example, if you create a CNAME to map images.example.com to images.example.com.s3.us-east-1.amazonaws.com, both http://images.example.com/filename and http://images.example.com.s3.us-east-1.amazonaws.com/filename will be the same.

profile picture
EXPERTO
respondido hace 10 meses
profile picture
EXPERTO
revisado hace 10 meses
profile picture
EXPERTO
revisado hace 10 meses

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