-- Leo's gemini proxy

-- Connecting to space.matthewphillips.info:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

Migrating off the Lambda Go 1.x Runtime


AWS is deprecating its Go1.x runtime in favor of a more generic Amazon Linux 2 runtime. I don't completely understand the reasons why, and this post isn't about that. There's a pretty good post of theres on the specifics:


Migrating AWS Lambda functions from the Go1.x runtime to the custom runtime on Amazon Linux 2


Here's the dirty details on how you can upgrade your functions, I found it to be very easy.


GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build \
-  -o main \
+  -o bootstrap \
+  -tags lambda.norpc \
  .

The differences here:


The binary must be called `bootstrap`.

The extra `-tags` flag supposed makes it faster by not using rpc.


That's really it! Then you can upload your new zip file and change the runtime in the UI. You can probably change this via the CLI as well, although I didn't want to learn the command to do so for a one-off.

-- Response ended

-- Page fetched on Wed May 15 22:48:01 2024