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?

asked a month ago390 views
3 Answers
0
Accepted Answer

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
answered a month ago
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
EXPERT
answered a month ago
  • 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
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions