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 Antwort
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
EXPERTE
beantwortet vor einem Jahr
profile picture
EXPERTE
überprüft vor einem Jahr
profile picture
EXPERTE
überprüft vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen