Open davidjb opened 1 year ago
We need this functionality to run offline using go in the provided.al2 runtime
Why hasn't this been merged?
Just an FYI on this: provided.al2023
has been released in the time since I opened this PR (https://docs.aws.amazon.com/linux/al2023/ug/lambda.html) so support for that needs to be added as well. We switched over to using SAM so I'll leave that for others to implement.
any news ?????
As the go1.x runtime is now officially deprecated and will not get any security updates the new runtimes provided.al2 and provided.al2023 need to be supported for golang to run locally.
gotta be accepted @dherault
@davidjb your branch didn't work for me (I kept getting errors related to lambci
). Does this PR require changes from https://github.com/dherault/serverless-offline/pull/1755 ?
Hi, this PR haas been open for a long time but still holds value for the community. I'm willing to merge it if someone would fix its conflict and/or re-open it.
Description
This adds support for the current Go runtime,
provided.al2
, used on AWS Lambda.Motivation and Context
The
go1.x
runtime is EOL as its underlying AMI became EOL on 2020-12-31 andprovided.al2
is its replacement (https://aws.amazon.com/blogs/compute/migrating-aws-lambda-functions-to-al2/). Whilst the AMI is still under technically under extended maintenance support, this extends only until 2023-12-31 (https://aws.amazon.com/blogs/aws/update-on-amazon-linux-ami-end-of-life/).The method here for checking the runtime and the handler's suffix (e.g. its file extension) may appear somewhat brittle but the GoRunner's internals implicitly require the
.go
source to be available and thus the handler already needs to besome/path/function.go
.How Has This Been Tested?
Added integration tests with
provided.al2
runtime and Go handler. Also tested locally in my current project.Screenshots (if appropriate):