Sometimes I get this weird urge not to self-flagellate. When that happens, I stop fucking around with Java, Javascript or Python and I turn to Go. Go is fast, light-weight and statically typed. Its package management system is a dream. You can get started with Go in about three seconds, which is 2 million times faster than the time it takes to work out what Microsoft was thinking when they created Typescript.

This is the first in a series of articles where we’ll write and deploy an entire backend using Golang, DynamoDB, AWS Lambda and API Gateway. My intent is to show you just how much better it is to write backends in Go. If I am successful in convincing you, then this will have been a worthwhile process. If I’m not, it’s still worthwhile, because then you’ll have learned that you hate yourself and you can seek out professional assistance.

What we will build

Eventually, the backend for a fantasy hunting log app where you can add new monsters, view all entries, and record kills.

In this specific article, we will create the first lambda (save-and-update) without any dynamo integration, deploy it to AWS and prove it works.

What you need

Go. I couldn’t explain the installation process any better than the official docs, so check those out here.

You also need an AWS account and some sort of code editor (I use VSCode).

Creating the Lambda

Before we do any coding, we need to create a lambda in AWS. Go to the lambda console (here) and click ‘Create function’. Enter a name for your function and make sure you select Go 1.x from the runtime dropdown.

#aws-lambda #deployment #golang #aws #programming

Golang Fantasy Hunting App, 1: Deploying a Golang App to Lambda on AWS
1.30 GEEK