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: Allow lambda image builder to use AL2023 #510

Closed
runlevel5 opened this issue Feb 22, 2024 · 3 comments · Fixed by #584
Closed

feat: Allow lambda image builder to use AL2023 #510

runlevel5 opened this issue Feb 22, 2024 · 3 comments · Fixed by #584

Comments

@runlevel5
Copy link

runlevel5 commented Feb 22, 2024

According to this announcement from AWS, it is now possible to use AL2023 for lambda base image. I think we should remove the warning saying Lambda runner provider only supports Amazon Linux 2.

For time-being, people workaround this limitation by explicitly specify baseDockerImage: 'public.ecr.aws/lambda/provided.al2023'

@kichik
Copy link
Member

kichik commented Feb 22, 2024

We are currently using public.ecr.aws/lambda/nodejs as the base image and not provider.al2. We let that image deal with the Lambda interface for us. But it doesn't seem like it would be too difficult to create our own bootstrap file for the provided runtime.

https://docs.aws.amazon.com/lambda/latest/dg/runtimes-walkthrough.html

@runlevel5
Copy link
Author

But it doesn't seem like it would be too difficult to create our own bootstrap file for the provided runtime

Thanks for the advise. It is indeed quite straightforward to make my own bootstrap file for runtime.

We are currently using public.ecr.aws/lambda/nodejs as the base image and not provider.al2

The error message is a bit misleading because public.ecr.aws/lambda/nodejs is not based on public.ecr.aws/lambda/provided.al2

ref: https://github.com/aws/aws-lambda-base-images/blob/nodejs20.x/Dockerfile.nodejs20.x

@kichik
Copy link
Member

kichik commented Feb 22, 2024

Thanks for the advise. It is indeed quite straightforward to make my own bootstrap file for runtime.

I'll be happy to take a PR for that.

The error message is a bit misleading because public.ecr.aws/lambda/nodejs is not based on public.ecr.aws/lambda/provided.al2

ref: https://github.com/aws/aws-lambda-base-images/blob/nodejs20.x/Dockerfile.nodejs20.x

IIRC it's just weird packaging but still AMZL2. You can confirm by checking /etc/os-release.

@mergify mergify bot closed this as completed in #584 Jun 5, 2024
mergify bot pushed a commit that referenced this issue Jun 5, 2024
Previously we required Amazon Linux 2023 (and the error message erroneously said Amazon Linux 2). With this change, we will still be using Amazon Linux 2023 by default, but Ubuntu and Amazon Linux 2 will also be supported.

Note that this changes the default base image from `public.ecr.aws/lambda/nodejs:20-x86_64` to `public.ecr.aws/amazonlinux/amazonlinux:2023`. The new image contains all the packages in the old one plus a few more Python packages. The new image is a bit smaller so might load faster. The only difference should be nodejs 20 in `/var/lang` which also includes the Lambda runtime.

Resolves #510
Resolves #423

BREAKING CHANGE: Node.js is no longer included by default with Lambda runner images
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 a pull request may close this issue.

2 participants