Source: Dev.to | Jan 26, 2026 (UTC)
Amazon Web Services (AWS) provides Amazon S3 for file storage and Amazon CloudFront as a Content Delivery Network (CDN) to accelerate content delivery. Replacing your S3 file URLs with CloudFront URLs is an essential step to ensure your files load faster, more securely, and more professionally.
In this guide, we’ll walk through the complete process—from configuring CloudFront to updating your S3 file URLs.
Why Should You Replace S3 URLs With CloudFront URLs?
Before we dive into the setup steps, here are the main reasons why CloudFront is highly recommended over directly serving files from S3:
- Faster load times thanks to global edge locations.
- More stable performance with content cached close to your users.
- Stronger security with Origin Access Control (OAC), HTTPS, and signed URLs.
- More professional URLs, like
https://cdn.yourdomain.com/image.jpg. - Lower data transfer costs when configured correctly.
Steps to Replace S3 URLs with CloudFront URLs
Make sure your S3 bucket contains the files you want to deliver through CloudFront.
Checklist:
- Ensure the bucket has the correct permissions.
- Upload all required files.
- You can keep Block Public Access enabled, because CloudFront will access the bucket using OAC.
2. Create a CloudFront Distribution (New UI – 5 Steps)
When you click Create distribution, CloudFront now displays a new 5-step wizard:
- Step 1 – Choose a plan
- Step 2 – Get started
- Step 3 – Specify origin
- Step 4 – Enable security
- Step 5 – Review and create
Below is the detailed walkthrough for each step.
You’ll see several plan options:
- Free – $0/month
- Pro – $15/month
- Business – $200/month
- Premium – $1000/month
And at the bottom:
- Pay as you go (Pricing varies with usage)
For standard CDN usage (websites, apps, static assets), the best option is:
✅ Pay as you go — no fixed monthly cost, pay only for what you use.
Click Next to continue.
Here you define the basic configuration of your distribution.
- Distribution name Use a clear, identifiable name, for example:
s3-ferry-example
Enter fullscreen mode
Exit fullscreen mode







Залишити відповідь