aws-actions / setup-sam

Action to set up AWS SAM CLI and add it to the PATH
Apache License 2.0
151 stars 23 forks source link

Runtime Node20.x support? #89

Closed mkkeems closed 10 months ago

mkkeems commented 10 months ago

Hello,

I was wondering if there are any updates planned for runtime Node20.x support? According to this article (https://aws.amazon.com/blogs/compute/node-js-20-x-runtime-now-available-in-aws-lambda/) Lambda can now run on node v20. When i tried to sam build a sam app locally with runtime set to Node20.x, build succeeded (sam-cli v1.103.0). However, when I tried to deploy the app w github actions, build failed with the following error:

Build Failed
Error: 'node20.x' runtime is not supported

I would really appreciate it if someone can share plans for node v20.x support in the near future. Thank you!

ssenchenko commented 10 months ago

You need to pull new version of SAM CLI See https://github.com/aws/serverless-application-model/issues/3460 for more details

mkkeems commented 10 months ago

@ssenchenko

As I've mentioned in my original post, build succeeds with the new sam-cli pulled on my local machine.

However, the issue i'm having is when i try to deploy the sam app with github actions. Here is a bit of the github workflow pipline.yaml I have:

 build-and-deploy-dev:
    if: github.ref == 'refs/heads/dev'
    needs: [test]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: aws-actions/setup-sam@v2
        with:
          use-installer: true
      - run: sam build --template ${SAM_TEMPLATE} --use-container

..and so on. This is where i get the error in github actions:

Build Failed
Error: 'node20.x' runtime is not supported

How should i update the .github/workflows/pipeline.yaml file in order for the sam app to be successfully built when the runtime is set to node20.x in the template.yaml?