
Managed infrastructure… Walk the Talk
During my time at AWS I was tought that managed infrastructure will give you the freedom to work on the things that really matter. This is, what I told customers and anyone who would listen. In fact, this is one of the value propositions of cloud. Now it it is time to act accordingly. I will stop setting up infrastructre my self to focus on the content.
Why going down the road of managed services
I have to confess, I am a techi. I like to play around with servers, programming, containers, clusters, networking and all these things that are basically fun to do. But in the end, this is techology for the sake of technology. Why would I do it? Simply because I can and it is a nice way of learning things? Is setting up servers, patching them, trouble shooting them and making sure, the services are up and available really fun? Well, probably in the beginning… but after a while? Very likely not.
Recently, I thought it would be a good idea, to have my own website. And as the person I am, I immediately started to work on the solution.
- Setup a linux server (at home or in the cloud)
- Harden the server
- Install a web server
- Install the database
- Configure certificates from let’s encrypt
- …
Needless to say, that this was not really efficient and would cause recurring effort for me, to keep the page up and running. Being honest to myself, I had to admit that I would not be able to have a highly available, easy to manage and cost effective solution, if I would follow this approach. And even worse, I spent so much time, thinking about the technology that I completely lost sight of my actual goal. Having a simple website and being able to publish a blog post from time to time.
This was the point in time, when “freedom to work on the things that matter” started to make aktual sense.
So, I decided to re-think and work backwards from my own requirements, to find the right solution.
What I wanted to do is:
- Have a website that is always on
- Have some static content
- Write a blog-post from time to time
- No dynamic interaction with people
- Write instead of manage infrastructure
After evaluating some options, like hosting providers, free and paid blog providers and even AWS Lightsail Wordpress, I came to the conclusion, that probably the simplest but sufficient solution for my problem was to host a web site on Amazon S3. This would give me everything I wanted to have, without the hassle of managing anything.
Building my website on top of managed services
The following steps describe how I set things up and explains the reasoning.
This is not a step by step walk through. You will find plenty of them online and even from AWS, so no need to do another one.
Target rchitecture
Even if the term target architecture might be a bit over the top for this solution, this section describes, how things are put together to have a almost zero maintenance, highly available website.
This offers:
- HA by design
- Possibility to bring your data close to your users with CDN
- Certificates managed by AWS
- No maintenance for infrastructure
- Low cost
Storing the content
Using S3 as source for static content makes a lot of sense because it is a highly available, low cost storage completely managed by AWS. No need to have a decoupled file system, separate from your web server to serve your data.
On top, S3 comes with a feature to use it for hosting of static content, which is basically what I want to do.
So, basically, I could serve my content by just using S3 and I would be done.
Strengths | Weaknesses |
---|---|
Low cost zero effort managed storage | No built in SSL for the hosting option |
Static content hosting removes the need for an own webserver | S3 specific domain names |
Having SSL and custom domain
In order to serve my content under a nice domain name (I know… hufnagel.io … what can I say, it’s my name. Hard to change.) AWS offers the possibility to use Route53 to register domains and manage your DNS records.
The second thing, AWS offers is the AWS Certificate Manager (ACM) service, which gives you free public certificates for services that integrate with ACM.
And the third offering is Amazon CloudFront, a Content Distribution Network (CDN) which integrates smoothly with ACM and allows you to serve your content under your domain, with SSL enabled.
Strengths | Weaknesses |
---|---|
Custom domain | Does a private website really need a CDN? Probably not |
SSL | Cost for traffic will increase with usage |
CDN brings your content close to your users | |
Some basic stats about usage provided by CDN out or the box | |
Always free tier available for CloudFront, depending on usage | |
Overall smooth integration |
Summary
By now, I have a close to zero effort setup which removes the burden of managing servers and other infrastructure and solves my problem.
I had to be honest with myself. Work backwards from my requirements and resist the urge to build the things on my own, just because I can.
This gives me the time to write this post, instead of maintaining my infrastructure.
But as stated in my career learnings architecture is about trade offs. Here I trade off personal freedom and time for technical flexibility and cost. Is it the right solution for everybody? Probably not. Is it the right solution for me? Currenty yes. Is it an issue, if I change my opinion? No. I could easily migrate the content to a different solution, giving me more flexibility when needd.
Thanks for reading!