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>

1 réponse
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
EXPERT
répondu il y a 10 mois
profile picture
EXPERT
vérifié il y a 10 mois
profile picture
EXPERT
vérifié il y a 10 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions