Maciej Winnicki

A better way of deploying Go services with Serverless Framework

Go is a great language. I really like it. It's super simple, statically typed, with a huge ecosystem. It makes you productive. Do you know what's better than Go? An AWS Lambda function written in Go and deployed with Serverless Framework.

The experience of building Go services with Serverless Framework is not the best, though. Well, that's pretty obvious because the framework is language-agnostic. Let me list some of the issues:

Usually, the solution is to have a Makefile or some Bash script that will automate the compiling and deploying process. But there is a better way.

The Plugin

I really care about the developer experience, feedback loop, and about using well-tailored tools that make our work easier. That's why I would like to introduce you to ⚡️ Serverless Framework Go Plugin!

The plugin solves all the aforementioned issues (and more!) and makes the development process seamless. Let see how it works.

Here is the minimal Go service:

service: example-service

plugins:
  - serverless-go-plugin

provider:
  name: aws
  runtime: go1.x

functions:
  example:
    handler: ./functions/example/main.go
    memorySize: 128

Now, let's see how it works: See the demo on X →

To sum up:

The plugin also supports serverless deploy function and serverless invoke local!

Go check it out! If you have any questions let me know in GitHub issues or here in the comments.