Reputation: 35
I am curious on how to find the S3 bucket to which cloudfront points (CNAME) E.g: https://drdxyzdg0sjtu.cloudfront.net/ ?
Upvotes: 2
Views: 4395
Reputation: 705
When you on your AWS Cloudfront distribution, go on the Origins tab, you will find the name of the corresponding S3 bucket under Origin ID.
Upvotes: 1
Reputation: 179114
There is no supported way to determine the origin server behind a CloudFront distribution that isn't your own.
Additionally, the origin server may not be S3 at all, since CloudFront also supports custom origins. In this case, at least the root of that distribution appears to be pointing to a bucket, since an S3 error message is returned.
Also, a single CloudFront distribution may have multiple origins, since path pattern matching in each cache behavior can route requests to different origins, including a mix of S3 and custom origins.
Finally, CNAME isn't really a correct term to use, here. CloudFront supports alternate domain names on the front side and refers to those, parenthenthetically as CNAMEs, and these do not need to match the bucket name when CloudFront is handling the request. On the back side, when accessing S3, CloudFront appears to use the global endpoint hostname for the bucket, example-bucket-name.s3.amazonaws.com. S3 internally maintains the DNS records for that style of URL so that the correct region is reached for each bucket.
Upvotes: 2