AWS CloudFront based Distribution of Files from S3 Buckets
NARAYANAN PALANI ??????
Platform Engineering Lead | AWS & Google Cloud Certified Architect | Cloud Solutions Expert | Driving Innovation in Retail, Commercial & Investment Banking | CI/CD | DevOps | Cloud Transformation
Have been tried to find ways on to enable a simple file to get accessed via public URL-that too with the help of CloudFront (CF). Written this article to share steps involved in making it to get stored in S3 and deploy via CF.
S3 Bucket Creation for File Storage
Create an S3 bucket and store the a file of choice for the public access from cloud front to get it configured.
While creating the S3 Bucket, make sure to disable 'Block all public access'
Used a sample image from GitHub to upload into this S3 bucket.
Add an S3 Bucket Policy
Update resource name as S3 bucket and give public access for the tag as 'public'
Now make sure to navigate to file properties and add a tag at the uploaded file as 'public'-this is to get accessed via URL:
After file upload and configurations, this file can be viewed from S3 Link:
Create CloudFront Distribution for Public Access
Disable Security Protections are not ideal for a project but made it to verify the access for a sample image:
Shared the file name in Default Root Object section:
领英推荐
After submitting the CF form, Deployment kick started:
Used the Distribution Domain Name to check online but no luck due to in-progress deployment:
Once deployment successful, this ARN reflected with right image file to get shared in public network:
Copy the Distributed Domain Name and paste it in the URL of a new webpage to verify:
Watch these simple steps in this video: Link
??Please feel free to share your views in the comments section on cloud distribution tech in similar cloud providers.
?Follow me on LinkedIn: Link
Like this article? Subscribe to Engineering Leadership , Digital Accessibility, Digital Payments Hub and Motivation newsletters to enjoy reading useful articles. Press SHARE and REPOST button to help sharing the content with your network.