Maintaining a website with AWS

    Ryanpskiles.com is hosted on AWS ISaaS platform on an EC2 instance running a LAMP stack. Sounds super-fancy right? I registered a domain with Route 53, selected a free-tier EC2 instance with Ubuntu installed. I logged in and updated the OS using PuTTY. I installed WordPress, a SQL server and Apache2. I manually configured DB credentials with PHP and set up WordPress. I went on to create a back up image of my configuration, and then I saw it. AWS offers a pre-configured machine-image with WordPress, Apache and PHP already set up. I set up a second EC2 instance and basically one-click installed everything I had worked on manually, in about 2 minutes.

    I laugh to myself a little about it now but it was my first step into VPN territory. AWS is really nice. It has some really neat, time saving features. Things that may have taken some length of time in the past (Traditional allocation of a LAMP webserver) now quite literally takes about a minute. It’s really neat, but it is also slightly daunting. The AWS console has so many features in 2018, that it almost seems impossible to even recognize how each feature is used. At this point in time the few that I have actually used to some extent are limited to just EC2, Route53, S3. This post will primarily be a chronological documentation of my experiences using AWS to serve this website.

    Amazon CloudFront is a web service that speeds up distribution of  static and dynamic web content by caching files in edge-locations, and by compression/decompression of file transfers. It can be used to decrease delivery latency of select files, directories or even your entire website if you so choose. I configured certain directories of this website to be delivered by CloudFront, namely to reduce load time of my image-heavy ‘Media’ page. Also because I think it is one of the ways I can get an SSL certificate for this website. I followed this tutorial on youtube to setting up a basic CDN using CloudFront. It actually went really well and did in fact decrease latency for the delivery of images (among other files).

    All I had to do was configure CloudFront to cache some content, then set up an alias A record in Route 53 to point at my CloudFront Distribution (I tested for delivery-speed on www subdomain pointing at origin IP and also on domain pointed at CDN to see speed side-by-side, I later added www A record)

From Origin IP

From CloudFront

Leave a Comment