I’m using a Javascript function for Lambda on Edge...
# general
I’m using a Javascript function for Lambda on Edge, with
Copy code
runtime: aws.lambda.NodeJS8d10Runtime,
but then received an email from AWS that that runtime will be obsoleted:
your AWS Account currently has one or more Lambda functions using Node.js 8.10, which will reach its EOL at the end of 2019.
So I wanted to switch to then next version but
Copy code
error TS2551: Property 'NodeJS10dXRuntime' does not exist on type 'typeof import("/.../node_modules/@pulumi/aws/lambda/i...'. Did you mean 'NodeJS6d10Runtime'
Note that
is still documented here: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/aws/lambda/#NodeJS10dXRuntime So I changed to using the string
which didn’t work
Copy code
error: aws:lambda/function:Function resource 'language-redirect' has a problem: expected runtime to be one of [dotnetcore1.0 dotnetcore2.0 dotnetcore2.1 go1.x java8 nodejs4.3 nodejs4.3-edge nodejs6.10 nodejs8.10 provided python2.7 python3.6 python3.7 ruby2.5], got nodejs10.x
and then went back to
Copy code
runtime: "nodejs8.10"
which is the one that will be obsoleted soon. So… what should I do here?
Aren't you running some very old version of
@tall-librarian-49374, I just updated Pulumi:
Copy code
> curl -sSL <https://get.pulumi.com> | sh
=== Upgrading Pulumi v0.17.16 to v1.5.2 ===
Does that not update the modules? Should I wipe the modules folder?
No, it doesn't. You need to update the npm package
It's now at 1.10. Although Node10 should be there since long.
I ran an
npm update
, so yes, I now see that module. Although
Copy code
> npm --version
npm --version
shows the version of npm itself
Sigh, yes.
Copy code
> node --version
All good then, thank you 👍
that's your node... try
npm list --depth=0