CloudSnorkel / cdk-github-runners

CDK constructs for self-hosted GitHub Actions runners
https://constructs.dev/packages/@cloudsnorkel/cdk-github-runners/
Apache License 2.0
255 stars 37 forks source link

feat: Allow lambda image builder to use AL2023 #510

Open runlevel5 opened 2 months ago

runlevel5 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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.