CloudFormation – Template for S3, Route53 and CloudFront

So, I was working on a project for the client who happens to be a famous standup comedian here in London. He asked us to develop a WordPress based website where he can post about his tours, recent activities and videos.

We created a standalone website using AngularJS but exposed the JSON based API on WordPress which is fairly a good approach.

Lets talk about how I designed the frontend architecture of this website. As what we have seen that the requirement of this project is not uncommon and can easily be mapped to other clients, I decided to give it a shot by creating a AWS CloudFormation template which would utilize a couple of AWS resources mentioned down below.

1) S3 Bucket with website hosting enabled.

2) CloudFront Distribution with the newly created S3 Bucket as Origin.

3) A new Hosted Zone on Route53 for website domain.

4)  An Alias record for the hosted zone which maps to the CloudFront Distribution.

Design

CloudFormation-Template

Template File

The actual template in JSON has been uploaded on Github as well. Please feel free to improve it and also share your feedback.

Link: https://github.com/uzairjawed/CloudFormation-Template-With-Route53-CloudFront-S3