cdk-github-runners icon indicating copy to clipboard operation
cdk-github-runners copied to clipboard

feat: Allow lambda image builder to use AL2023

Open runlevel5 opened this issue 1 year ago • 3 comments

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'

runlevel5 avatar Feb 22 '24 00:02 runlevel5

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

kichik avatar Feb 22 '24 17:02 kichik

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

runlevel5 avatar Feb 22 '24 23:02 runlevel5

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.

kichik avatar Feb 22 '24 23:02 kichik