Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support Go on provided.al2 runtime #1691

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidjb
Copy link

@davidjb davidjb commented May 10, 2023

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 and provided.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 be some/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):

This adds support for the current runtime used for Go on AWS. The `go1.x` runtime is EOL as its underlying AMI became EOL on 2020-12-31 and `provided.al2` is its replacement (https://aws.amazon.com/blogs/compute/migrating-aws-lambda-functions-to-al2/). Whilst the AMI is still 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/).

This also ensures that any `vendor/` directories from Go in the runtime tests are ignored.
@jaimeniswonger
Copy link

We need this functionality to run offline using go in the provided.al2 runtime

@kevingilbert100
Copy link

Why hasn't this been merged?

@davidjb
Copy link
Author

davidjb commented Dec 20, 2023

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.

@nicolas-serbin
Copy link

any news ?????

@Cr4mble
Copy link

Cr4mble commented Feb 27, 2024

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.

@AntonyOnScript
Copy link

gotta be accepted @dherault

@AnalogJ
Copy link

AnalogJ commented Mar 18, 2024

@davidjb your branch didn't work for me (I kept getting errors related to lambci). Does this PR require changes from #1755 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants