Undefined Variable
Undefined Variable

Reputation: 4267

How to find S3 connected to a cloudfront URL

The client has a site running on PHP deployed over AWS infrastructure. I have access to AWS console of a client.

There are some images in his site that is loading from cloudfront (which I understand is mapped to an S3 bucket). I need to update these images, but I do not know which S3 bucket they are in, since client has a lot of S3 buckets configured. How do I figure this one from the console?

Upvotes: 1

Views: 2476

Answers (2)

Prerna Singhal
Prerna Singhal

Reputation: 26

also to add on John's answer; after you have changed the image in origin S3 bucket; you will have to invalidate the cache for those images in CloudFront .. otherwise even though origin has changed u will keep seeing old images

Upvotes: 0

John Rotenstein
John Rotenstein

Reputation: 269971

First, you will need to find the CloudFront distribution that is serving the content. Find the distribution with the same cloudfront.net URL that you're using to access the images.

Then, look at the behaviors and origins of the distribution to determine when it is going to each origin, and which origin is serving the path. This will then tell you which Amazon S3 bucket is being used.

Upvotes: 1

Related Questions