Upgrade NodeJS on CodeCatalyst action runners

0

I needed to update CDK to get NodeJS > 16 on my lambda functions. Now the cdk actions won't work because the action runners are all NodeJS 16. Am I missing some way of upgrading NodeJS on the action runner?

feita há 2 meses399 visualizações
3 Respostas
0
Resposta aceita

I found a work around for this issue. There's a version of aws-cdk-lib that will run on node 16 but supports creating node 18 lambdas. Here's the fix:

npm install aws-cdk-lib@2.51.0
respondido há um mês
0

setup-node action in your GitHub Actions workflow allows you to specify the Node.js version that you wish to run in your workflow.

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
  with:
    node-version: '18' # Specify the Node.js version here
- run: npm install
- run: npm test
profile picture
ESPECIALISTA
respondido há 2 meses
  • Codecatalyst actions don't seem to be 1:1 with github actions. I just tried using nvm to update the node version (see below). But now the build complains that "GLIBC_2.27" and "GLIBC_2.28" are not found (required by node). This seems to be a problem with the image that is used for Codecatalyst action runners.

    Configuration:
      Steps:
        - Run: echo "Building Backend Artifacts..."
        - Run: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
        - Run: . ~/.nvm/nvm.sh && nvm install 18
    
0

Hi Robert - I'm glad you were able to find an answer. Were you trying to interact with cdk via a build action? Or were you using the cdk-deploy action in CodeCatalyst? If you are using a build action we recently released a new runtime image (March-2024) that does have more up to date versions of certain tools.

https://docs.aws.amazon.com/codecatalyst/latest/userguide/build-images.html

It would also be good to know what CDK construct you are using to construct your Lambda functions.

AWS
MODERADOR
AWS-Jay
respondido há um mês

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas