Mini Project on CloudFront Distribution
Image Credit-AWS

Mini Project on CloudFront Distribution

Hello Friends I have completed a mini project on CloudFront distribution.

Following are the steps I followed for the project.

? First I created a S3 bucket

? Uploaded an image file in the bucket

? Created a Folder named CutomErrors in S3 Bucket

? Created simple webpages for displaying error page (Error.html) and for telling the user the users that the content is blocked for their location(Block.html).

? Created a CloudFront distribution?.

? In the Origin Domain name , I gave the address of S3 bucket created previously.

? Distribution creation will take 5 to 10 mins.

? Copy the domain name of CloudFront distribution and append the image file name with the distribution and hit the url, you will quickly see the image file via the CloudFront domain.

? You will see CloudFront URL loads the image file very fast.

? Select the CloudFront distribution and select the Error pages and created Custom Error Response with HTTP error code as 404 Not found and gave the Response Path Page as the URL of folder along with error page?which we created in S3 bucket for custom errors

? Deploy the changes and it will take 5/10 mins to completely reflect the changes

? Next access the CloudFront domain with any other image file name which doesn't exist in S3 bucket, you will get the Custom Error page which means that Error page is correctly working.

? Next I made the Geographic Distribution of my Content restricted.

? For this I clicked on Geographic locations tab of CloudFront distribution and selected Block list under Restriction Type and Selected my Country.

? Selected the CloudFront distribution and select the Error pages and created Custom Error Response with?Http Error Code: Select 403: Forbidden gave the Response Path Page as the URL of folder along with the block page which we created in S3 bucket for custom errors

?Deploy the changes and it will take 5/10 mins to completely reflect the changes

? Next access the CloudFront domain with image file URL and you will be able to see the block page.

If you see the error, this means you successfully configured a custom error page and restricted image access from your country.

I hope you enjoyed reading the post. Do implement the project and get hands on practice on CloudFront!!!

Great work, Asma Akram. Keep up the good work.

Seynabou GUEYE

Ingénieur Informaticienne| Professional Scrum Master (PSM1) | AWS Certified

1 年

Well done Asma

Suneetha Karthik

Versatile professional driving efficiency, innovation, client satisfaction and growth.

1 年

Good going Asma. All the best

要查看或添加评论,请登录

社区洞察

其他会员也浏览了