A Beginner's Guide to Amazon CloudFront : Key Features Explained
Learning DevOps Engineer passionate about cloud computing, containerization, and automation. Currently exploring Docker, AWS, and CI/CD pipelines to build scalable and efficient workflows. Documenting my learning journey in blog. stay tuned with me for learning.
AWS CloudFront :
Content Delivery Network (CDN)
Improve read performance, content is cached at the edge.
Improves user experience.
216 points of presence globally (edge location)
CloudFront - origins
S3 bucket .
For distributing files and caching them at the edge.
For uploading files to S3 through CloudFront.
Secured using origin access control (OAC)
VPC - origins
For application hosted in VPC private subnet.
Application load balancer / Network Load balancer.
Custom Origin (HTTP)
- S3 website (must first enable the bucket as a static S3 website).
CloudFront vs S3 Cross Region Replication.
CloudFront :
Global Edge Network.
Great for static content that must be available everywhere.
S3 Cross Region Replication :
Must be setup for each region you want replication to happen.
Files are updated in near real-time.
Read only.
Great for dynamic content that needs to be available at low-latency in few regions.
If the content is already in the location with the lowest latency CloudFront delivers it immediately.
If the content is not in that edge location, CloudFront retrieves it form an origin that you’ve defined as an amazon S3 buckets, MediaPackage channel, or an HTTP server (for example, a web server ) that you have identified as the source for the definitive version of your content.
First we have to create S3 bucket and upload file.
Log in to the AWS Management Console.
S3 services.
Bucket name: Must be globally unique.
Region: Choose your desired AWS region.
Object ownership - ACL disable
Bucket Versioning - disable
Create bucket.

How to upload file or folder
Bucket
Select Upload.
Add file or Add folder
upload.
And allow object publicly accessible.
Click on the object you want to make public.
Select the “Permissions” tab.
Click Edit
I acknowledge that ACLs will be restored.
Click Make public.
Create CloudFront Distribution
Search for CloudFront :
Click "Create Distribution"
Distribution name : (Ex... DemoNewCloudFront).
Distribution type :(Single website app).
Domain name :
CloudFront works without a custom domain using default distribution URL, but in production we attach a domain.Origin type : Amazon S3
S3 origin : (bucker name ).
Create Distribution.

ON S3
Select Your Bucket
Go to Permissions Tab
Disable Block Public Access
Open your bucket
Go to Permissions
Scroll → Block Public Access
Click Edit
Uncheck:
- ✅ Block all public access
Save → type confirm
ACL in S3
Click Permissions
Find “Access Control List (ACL)
Click Edit
Go to Object Ownership
Click Edit
Select:
ACLs enabled

Save changes
Full control (default) :
You can allow:
Read (⚠️ makes bucket public).
Enable Static Website Hosting
Go to Properties tab
Scroll → Static website hosting
Click Edit
Select:
- ✅ Enable
Enter:
Index document →
index.html(your image name)Error document →
error.html(optional)
👉 Save changes
Access Your Website :
