Using an AWS S3 Bucket with a CDN

Using an AWS S3 Bucket with a CDN

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:

  1. Add it to your CDN origin settings.

  2. Configure your cache rules and custom domains if needed.

  3. Test by accessing the content via your CDN endpoint.


 

    • Related Articles

    • Page Rules and Caching Settings for WordPress with VergeCloud CDN

      Setting Up Page Rules and Browser Caching for Your WordPress Site with VergeCloud CDN When you activate VergeCloud CDN for your WordPress site, content is cached on VergeCloud's edge servers for 30 minutes by default. However, some parts of your ...
    • Verifying Your Domain in Google Search Console Using a TXT Record

      Introduction To begin using Google Search Console, you must first confirm ownership of your domain. This verification process ensures that you have the rights to the domain you wish to manage in Search Console. This guide outlines the steps to verify ...
    • Modify HTTP Headers on the Fly with VergeCloud CDN

      Understanding the Challenge Web applications and APIs rely on HTTP headers for authentication, caching, security, and traffic management. However, modifying headers at the origin often requires server-side code changes, leading to: Complex deployment ...
    • Migrating Your API Domain to a CDN with 1-Second Caching Strategies

      Understanding the Challenge APIs serve as the backbone of modern applications, enabling seamless communication between services. However, slow API response times and high latency can significantly degrade user experience and increase infrastructure ...
    • DDoS Mitigation

      VergeCloud offers robust protection against DDoS attacks, designed in four stages to safeguard your website from malicious intrusions. This guide will help you understand how to implement and manage DDoS protection effectively through the VergeCloud ...