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?

gefragt vor 2 Monaten400 Aufrufe
3 Antworten
0
Akzeptierte Antwort

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
beantwortet vor einem Monat
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
EXPERTE
beantwortet vor 2 Monaten
  • 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
MODERATOR
AWS-Jay
beantwortet vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen