Show HN: I wrote a book about using Lambda with Go
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
18 comments
[ 0.26 ms ] story [ 60.7 ms ] threadhttps://kevinmcconnell.gumroad.com/l/lambda-go-book/hn
I purchased the book and was surprised there wasn’t more on the EFS usage, but otherwise the book looks wonderful.
0. https://docs.aws.amazon.com/lambda/latest/dg/images-create.h...
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.
Thanks for the feedback!
It’s fashionable to hate on k8s as a Google project but AWS is what props Amazon up, while k8s runs on an Rpi. Online retail is too easy to replicate.
IT people are feeding the beast they complain about; complexity through numerous APIs to do the same tasks. Security through obscurity, by letting Amazon decide what’s secure in their API sandbox.
Nevermind all the “walled garden” complaints about app stores. Cloud is the root node walled garden of computing. Where do you think all those apps get distributed from?
Way to build your own prison.
I've mostly found that my cold starts were slow enough to look bad in the metrics, but fast enough (and rare enough) that the impact on user experience wasn't actually that noticeable. Given the other benefits I was getting from Lambda (like the easy scaling and low maintenance), it was worth the occasional small blip in latency.
And for functions that aren't directly user facing -- like processing items from a queue -- I've not found it to be an issue at all.
Of course every use case is different though, and some apps can tolerate this more than others.
Underneath it still happens by way of S3 & CloudFormation, but the CDK abstracts away a lot of the details, which makes it quite convenient to use.
[0] https://docs.aws.amazon.com/cdk/api/latest/docs/aws-lambda-g...
If you're interested in the details, I wrote a blog post that goes into it a bit more: https://www.kevinwmcconnell.com/writing/how-i-wrote-my-book
That post also has a link to a repo with all the settings/theme/etc, so anyone can take it and use it as a starting point for their own book.