If you're hosting content in an AWS S3 bucket and want your CDN to pull from it, the CDN needs to know exactly where to look. That means pointing it at either the bucket's endpoint or the direct URL of the specific object you want cached and served. Getting the right URL in the right format up front saves you a round of troubleshooting later when files aren't loading the way you expect.
This article walks through both URL types, where to find them in the S3 console, and what to do once you have them.
What You Need
There are two URL formats you'll be working with, and which one you use depends on whether you're pointing your CDN at the whole bucket or just a single file.
1. S3 Bucket Endpoint
This is the base URL for your entire bucket, the root location everything else in the bucket sits under.
Format: http://[bucket_name].s3.amazonaws.com/
Example: http://202533521498.s3.ap-south-1.amazonaws.com/
Use this when you want your CDN pointed at the bucket as a whole, rather than a specific file inside it. This is the more common setup if your bucket is acting as the origin for a whole site or app's static assets.
Screenshot
2. Object URL
Every individual file stored in the bucket, whether that's an image, a PDF, a video, anything, has its own direct URL.
Format: https://[bucket_name].s3.amazonaws.com/[object_key]
Example: https://202533521498.s3.ap-south-1.amazonaws.com/eye.jpeg
Use this when you're linking to or caching one specific file rather than the bucket as a whole. This is the format you'll reach for most often if you're embedding individual assets directly in a page or app, like a single hero image or downloadable document.
Where to Find These URLs
Bucket Overview
- Go to the S3 Console.
- Click on the bucket name.
- You’ll find the bucket endpoint in the Overview section.
Screenshot

Object Properties
- Navigate to your desired object (e.g., image, PDF, etc.).
- Open the Properties tab.
- The object URL will be displayed there.
Screenshot

Allow Public Access to the Object URL
Having the right URL is only half the equation. If the bucket or object itself isn't publicly accessible, your CDN will get the same access error a regular visitor would. You'll need to configure the relevant permissions and access settings in S3 so the object can actually be reached at that URL.
Screenshot

This step trips people up more often than the URL formatting does. It's worth double checking your bucket policy and object-level permissions before assuming the integration itself is broken if content isn't loading.
Example
Bucket Name: 202533521498
Object Key: eye.jpeg
Object URL:
https://202533521498.s3.ap-south-1.amazonaws.com/eye.jpeg
This is the URL you would provide to the CDN or use in your website/app.
This is the exact URL you'd hand off to your CDN configuration, or drop directly into your website or app wherever that asset needs to load from.
Screenshot

Next Steps
Once you've got the correct URL in hand:
- Add it to your CDN's origin settings.
- Set up your cache rules and any custom domains you need on top of it.
- Test the setup by loading the content through your CDN endpoint rather than the raw S3 URL, to confirm everything is actually routing and caching the way you expect.
That last step matters more than it sounds like it should. A URL that works fine when you paste it into a browser directly can still fail through the CDN if permissions, region settings, or cache rules aren't lined up correctly, so always verify through the actual CDN endpoint before considering the integration done.