Moving my websites to AWS

Posted on · Reading time: 3 minutes

Way back in 2017, I wanted to move my web server to AWS. It took until this year for me actually get my act together and make it happen.

Brief history

I started back in late 2017 with the idea to move to AWS, but things didn’t work out. I attempted to build support for an email server, but it was insanely complicated. Mailboxes, authentication, encryption, anti-virus – all of it coming together just wasn’t working consistently. I ended up needing to focus on other things, so I abandoned the idea and kept my existing server running.

What’s AWS, and why AWS?

AWS is Amazon Web Services, and is easily the largest cloud hosting provider on the planet. AWS accommodate small operators like myself all the way up to platforms like Netflix and Reddit – all at the same time. It is a truly astronomical service.

Admittedly, AWS’s popularity was what attracted me to use it and I didn’t really look into Microsoft’s Azure platform or Google’s Compute Cloud. Another attraction was the excellent documentation provided by AWS, and the number of tutorials and examples that can be referred to.

My requirements

I set out with a vision of how the new server would look and operate, and I wasn’t going to make any compromises.

1. It has to be quick

Speed and responsiveness is what people expect from websites, and my existing server was starting to fall behind the requirements demanded in 2020.

2. It needs to be lean

My existing server was “managed”, meaning a lot of functionality and configuration was provided for me, and to cater for a wide range of customer needs. I know what my needs are, so the new server had to meet those, and only those needs.

3. Physically in the UK

The existing server was based in the US which was fine back in 2010, but as things progressed (notably the GDPR), I realised that things needed to be moved back home. The new server was to be in the AWS UK datacenter (London).

4. Abandon email management

Email is a nightmare, and a big one at that. Configurations are sophisticated and aren’t something that can be easily followed in a how-to guide. This was the main blocker back in 2017.

My solution

After a week of late evenings, and a couple of borked boxes (firewalls are fun!), I had my working web server running. This website was the first one migrated, everything fell into place with only a couple of hitches that were speedily ironed out. My other sites and client websites will follow over the next few weeks after I conduct some more testing.

For those interested, here’s what I’m running.

The AWS systems:

SES allows the web server to send email messages out (which would usually be contact form or system notifications). Instead of using Amazon’s highly competent WorkMail solution, I chose to use Zoho’s managed email solution instead. Considerably cheaper, and does pretty much the same thing.

The server software:

The results

They’re pretty nuts. Benchmarks on Google PageSpeed insights show desktop performance has went up from about 50% to 100%, and 95% for mobile. Responses from cached WordPress pages are sometimes completed in less than 100ms.

The excellent results stem from a combination of NGINX’s considerable performance gain over Apache, and being physically closer to where most requests will originate from.

Managing the server will be a bit different to what I’m used to, with no more WHM or Cpanel, it means a lot more shell time. Hopefully I’ll automate some of these tasks in the future.