Useful flags for Go Lambda functions
Last week AWS published a blog post advising that the go1.x Lambda
runtime will be deprecated and people should migrate to provided.al2. I was
already using the newer runtime, but I also learned from the blog post that AWS
SAM can now build Go Lambda functions for the newer runtime - no more Makefiles
required!
I switched from BuildMethod: makefile to BuildMethod: go1.x and noticed that
my Lambda packages were now twice the size. This means slower cold starts and
slower deployments - especially from my laptop in Australia. I also noticed that
my CI pipelines were slower because every commit was causing Lambda updates, even
when no code had changed.