To integrate an AWS S3 bucket with a CDN, you’ll need to reference the S3 bucket’s endpoint or the specific object URLs. These allow the CDN to fetch and cache the content hosted in your S3 bucket.
What You Need
1. S3 Bucket Endpoint
This is the base URL for accessing your entire S3 bucket.
Format: http://[bucket_name].s3.amazonaws.com/
Example: http://202533521498.s3.ap-south-1.amazonaws.com/
Use this when pointing a CDN to the whole bucket.
Screenshot
2. Object URL
Each file or object stored in the bucket 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 linking or caching specific files.
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
Configure permissions and access settings in Amazon S3 to allow public access to a specific object via its URL
Screenshot
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.
Screenshot
Next Steps
Once you have the correct URL:
Add it to your CDN origin settings.
Configure your cache rules and custom domains if needed.
Test by accessing the content via your CDN endpoint.