💾 Archived View for space.matthewphillips.info › posts › migrating-off-lambda-go-runtime captured on 2024-03-21 at 15:14:04. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-11-04)
-=-=-=-=-=-=-
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:
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.