Keith Hirst

Keith Hirst

Where to start with AWS

Where to start with AWS

Introduction

Getting started with AWS can be daunting, and the advice I usually give is to "simply dive in". Diving in is how I started with AWS but I was working in a consultancy at the time with a great team around me. There isn't anything "simple" about that.

I recently became self-employed and when I tried to "dive in" to build some "simple" serverless prototypes (I will share more soon) I struggled to get started. I soon realised that while I knew how to create serverless apps, I had never had to do the setup, and this made me feel paralysed and frustrated.

I decided to revisit the basics and compare the "Getting Started" tutorials for some infrastructure as code (IAC) tools to see if I could give myself that solid foundation to build on.

  1. Serverless Framework
  2. Terraform
  3. AWS CDK

Serverless Framework Logo

Serverless Framework

Serverless Framework was my first introduction to IAC and I always found it to have excellent documentation. The getting started tutorial is no exception.

It includes a well-made video walkthrough to get a preview of what you will be doing. Watching this all the way through before you start will help you familiarise yourself with any new concepts you come across.

The tutorial is well structured and broken down into small steps, allowing you to think through what you have just learned.

I am torn about how they include a section on creating an account with their dashboard. It takes up a large chunk of the tutorial for something unnecessary. However, local setup isn't that easy with AWS, so the dashboard allows you to get into building quicker. My advice here would be to follow the tutorial but learn how to do it the long way when you are comfortable. This will ultimately make you a more well-rounded developer.

At the end of this tutorial, you will have successfully deployed two Lambda functions that can talk to a DynamoDB. This is a great foundation to start building a serverless application and you can go a long way with just this.

Terraform Logo

Terraform

I have not used Terraform, but it is a popular tool and knowing it will make you more employable. After following the getting started tutorial I felt that if I was new to AWS, I would struggle to know where to go next.

The tutorial is broken up into eight parts, which is fine, but individually I don't feel like they gave you a sense of progression which I feel raises the barrier of entry slightly. It's like learning Maths at school, you know what you are learning is important, but you don't see how it's important to you right now.

After the tutorial, you will have deployed an EC2 instance. If you want to build a serverless application, Terraform has an excellent tutorial for that. If you are getting started with Terraform, I think you would get a lot out of starting with a more specific tutorial and using the documentation if you get stuck along the way.

AWS CDK logo

AWS CDK

CDK is my go-to choice for building large scalable solutions. It allows you to provision AWS services using actual code, making it easy to create reusable and readable IAC using if statements and loops. CDK is also testable, giving you the ability to ensure your infrastructure will work as expected. I haven't seen many good examples of how to write good tests for CDK though.

The getting started tutorial recommends that you only take it if you have had previous experience with AWS and IAC. While I love CDK, I agree you probably are best spending a month or so with Serverless Framework or Terraform before jumping in here.

Conclusion

In my opinion, gaining hands-on experience is the most effective way of learning AWS. If you aren't working on a project that is already set up. Then I believe Serverless Framework offers the best path to go from zero to something usable.

If you are wanting to be more cloud agnostic then Terraform will be your go to IAC tool as that supports many different cloud providers and it is even possible to use them together.