Live data from Hacker News

Show HN: I wrote a book about using Lambda with Go

news.ycombinator.com

1–10 of 19 posts

Show HN: I wrote a book about using Lambda with Go

#1
Hi HN!

During the last few years, I worked on a few applications built with Go, running on AWS Lambda.

As I got to know the platform better, I started to find Go & Lambda to be a really productive combination. The applications were fast, and they ended up being much cheaper to run than what my team & I had built before. It’s probably not the best platform for _every_ application, but I was surprised at how much of our workload worked well on it.

As we brought new engineers on to our team and helped them get up to speed with the stack, I found that we were covering a lot of the same topics over and over — especially things like performance, testing and monitoring. Since this knowledge turned out to be very useful for our team, I decided to gather it into a book that will hopefully also be useful to others.

This is my first time putting something like this together, so I'm grateful for any feedback!

The book is at: https://kevinmcconnell.gumroad.com/l/lambda-go-book/hn (with HN discount ;))

There's also a link on that page to a free sample that you can download without registering.

Thanks!

Cheers, Kevin

Re: Show HN: I wrote a book about using Lambda with Go

#3
I have used Lambda extensively over the past three months in Python, Ruby and Node. The largest game changer for me was discovering Lambda Layers and realizing how I could avoid compiling zip folders to deploy. I’ve loved the iteration speed and performance, and recently have depended heavily on the Lambda + EFS combo.

I purchased the book and was surprised there wasn’t more on the EFS usage, but otherwise the book looks wonderful.

Re: Show HN: I wrote a book about using Lambda with Go

#4

I have used Lambda extensively over the past three months in Python, Ruby and Node. The largest game changer for me was discovering Lambda Layers and realizing how I could avoid compiling zip folders to deploy. I’ve loved the iteration speed and performance, and recently have depended heavily on the Lambda + EFS combo. I purchased the book and was surprised there wasn’t more on the EFS usage, but otherwise the book l…

What you described with Lambda Layers sounds like a thin layer over Lambda container images[0]. What are the benefits to using traditional lambda + lambda layers vs lambda container images?

0. https://docs.aws.amazon.com/lambda/latest/dg/images-create.h...

Re: Show HN: I wrote a book about using Lambda with Go

#5

I have used Lambda extensively over the past three months in Python, Ruby and Node. The largest game changer for me was discovering Lambda Layers and realizing how I could avoid compiling zip folders to deploy. I’ve loved the iteration speed and performance, and recently have depended heavily on the Lambda + EFS combo. I purchased the book and was surprised there wasn’t more on the EFS usage, but otherwise the book l…

Have you found a scalable solution to manage layers with infrastructure as code? As soon as I introduced them to my team, they started demanding exploitations of the process and it became a mess. Would love to know the best practices! Also beware of EFS, our applications did some heavy lifting with EFS and we found a bug that broke our stack. Not sure it's completely production ready. Took Amazon well over a year to find it and reimburse :)

Re: Show HN: I wrote a book about using Lambda with Go

#6
post #4

I have used Lambda extensively over the past three months in Python, Ruby and Node. The largest game changer for me was discovering Lambda Layers and realizing how I could avoid compiling zip folders to deploy. I’ve loved the iteration speed and performance, and recently have depended heavily on the Lambda + EFS combo. I purchased the book and was surprised there wasn’t more on the EFS usage, but otherwise the book l…

What you described with Lambda Layers sounds like a thin layer over Lambda container images[0]. What are the benefits to using traditional lambda + lambda layers vs lambda container images? 0. https://docs.aws.amazon.com/lambda/latest/dg/images-create.h...

For clarification, Lambda Layers is the packaging of a node_module, vendor/gem, or python package folder, and then "sharing" that across various Lambdas, instead of deploying the shared files again and again.

The actual lambda file ends up being a few hundred bytes, because they are literally just one function in a single file.

There is no compiling involved in the Layers after its made once. The only changing part of the Lambda is the lambda_handler.

Re: Show HN: I wrote a book about using Lambda with Go

#9
Golang is great for lambda - you compile in the entire lambda runtime and end up with a single 20MB executable that does everything needed. Other runtimes have a couple hundred megabytes of overhead for the lambda runtime and AWS SDK (though you don’t see the overhead unless your doing the ECR based lambdas). The part I’ve always struggled with is cloudformation only lets you inline 4K of code. The underlying api allows for payloads of up to 50mb before you have to pull from S3 or ECR, would love to see a little more flexibility - otherwise you have a lot of overhead to setup ci/cd pipelines and signal lambda to update from another source.

Re: Show HN: I wrote a book about using Lambda with Go

#10

I have used Lambda extensively over the past three months in Python, Ruby and Node. The largest game changer for me was discovering Lambda Layers and realizing how I could avoid compiling zip folders to deploy. I’ve loved the iteration speed and performance, and recently have depended heavily on the Lambda + EFS combo. I purchased the book and was surprised there wasn’t more on the EFS usage, but otherwise the book l…

Thanks! And that's a good point about EFS, it's something I've found very useful too. I'm planning to add some updates to the book, so I'll put it on my list of things to include.

Thanks for the feedback!

Post reply on HN