A DevOps Engineer’s life! A quick, cheap and serverless website…..S3/CloudFront/Route53

I recently got asked if I can get a temporary webpage up which can display static content for a few days. The main site had moved to a different URL and we needed to display a page (not redirect which you can via S3 as well by the way) so anyone opening the URL should see/read and then click on the link to land on to the moved page.

It had to support the HTTPS with our SSL certificate as well so customers can trust what they are seeing… security is everything right?!

What does it better than S3, CloudFront and Route 53, which costs only $1-$3 a month (0.5 cents if you are in Free Tier) and is available via AWS’s worldwide Content Distribution Network to speed up the loading time from worldwide locations!

Below is a how CloudFront works in a nutshell….

So let’s start!!

Step 1: Create a S3 Bucket with your index.html (or whatever you want to call it) with permissions set to public Read and enable “Static website hosting.”

Step 2: Create a CloudFront distribution which has Origin set to your S3 Bucket, and set it to use your trusted certificate in ACM. We will be using a wildcard certificate here!

The CNAME is set to the Route53 entry I will be creating in Step 3.

The CloudFront Origin is set to our S3 bucket where our content is hosted and supports both HTTP and HTTPS.

Step 3: Create a Route 53 entry in your DNS Zone which points to CloudFront “Domain Name” as shown in step 2.

Step 4: Allow 5-10 mins for DNS to catch-up worldwide/TTLs to refresh and we are done!

Result: The https://my.messagemedia.com/ site is up and running 🙂 Wasn’t that tough? Isn’t it? 😀

Need little more security..?

You can enable Geo Restriction on it so you can select users in which countries can open it…;)

That took in total of 5 minutes to setup and is completely server-less a.k.a. no OS(Windows/Linux), no Web Server (Apache etc), no IP configuration, patching, NIC Binding nothing…. !

I did remove some numbers and letters to ensure some privacy


Continue reading...

Everything you missed at DevDay
Natalie Byrgiotis
October 30, 2018
Chameleon SMS
Ibrahim Tareq
October 29, 2018
MessageMedia x Auth0
Ibrahim Tareq
October 25, 2018