is Node12 still the latest available runtime in th...
# aws
b
is Node12 still the latest available runtime in the lambda provider? https://github.com/pulumi/pulumi-aws/blob/master/sdk/nodejs/lambda/runtimes.ts
i realize thats for the SDK, but 12 has reached EOL and lambda supports 14 and 16 now, so not being able to choose a runtime past 12 seems odd
l
You should be able to select it until November, when AWS is removing it.
But it's not the default any more, since about 2 weeks ago?
16 is now the default.
Maybe that file is just a partial definition? Other runtimes are supported. E.g. here's 16: https://github.com/pulumi/pulumi-aws/blob/4d551bd0370316acead9e47be1c5ce19b71dd304/sdk/nodejs/lambda/lambdaMixins.ts#L351
b
When I try to use 14 or 16 I get an error saying it's not part if the package
l
You're importing from the file you linked to, maybe? Have you used Runtime.NodeJS16dX as the value?
b
14dx yes
Not from that file directly, I get a error saying it's not in node modules pulumi aws lambda
So I went looking for the git code
l
Can you share code?
b
I'm not at PC right now, but I will, apologies
šŸ‘ 1
Copy code
root@2dee11220fd3:/data/pulumi/infra/aws/projects/crm/environment/lambda-intake-process-intake/intake-process-intake# pulumi plugin ls
NAME    KIND      VERSION  SIZE    INSTALLED     LAST USED
aws     resource  5.13.0   412 MB  23 hours ago  23 hours ago
docker  resource  3.4.1    38 MB   23 hours ago  23 hours ago
docker  resource  3.1.0    40 MB   23 hours ago  23 hours ago

TOTAL plugin cache size: 490 MB
root@2dee11220fd3:/data/pulumi/infra/aws/projects/crm/environment/lambda-intake-process-intake/intake-process-intake# pulumi up
Previewing update (lambda-intake-process-intake.c_mycompany.a_crm.e_stage.n_main.r_us-west-2):
     Type                 Name                                                                                                   Plan     Info
     pulumi:pulumi:Stack  lambda-intake-process-intake-lambda-intake-process-intake.c_mycompany.a_crm.e_stage.n_main.r_us-west-2           1 error
 
Diagnostics:
  pulumi:pulumi:Stack (lambda-intake-process-intake-lambda-intake-process-intake.c_mycompany.a_crm.e_stage.n_main.r_us-west-2):
    error: Running program '/data/pulumi/infra/aws/projects/crm/environment/lambda-intake-process-intake' failed with an unhandled exception:
    TSError: āØÆ Unable to compile TypeScript:
    index.ts(33,29): error TS2551: Property 'NodeJS14dXRuntime' does not exist on type 'typeof import("/data/pulumi/node_modules/@pulumi/aws/lambda/index")'. Did you mean 'NodeJS10dXRuntime'?
Copy code
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

...

var lambda_function = new aws.lambda.Function(
    name,
    {
        name: name,
        runtime: aws.lambda.NodeJS14dXRuntime,
        code: new pulumi.asset.AssetArchive({
            ".": new pulumi.asset.FileArchive(`./${CODE_PATH}/${CODE_PATH}.zip`),
        }),

...
Copy code
root@2dee11220fd3:/data/pulumi# yarn list | grep pulu
warning package.json: No license field                                                                                                                                                                
warning infrastructure-pulumi: No license field                                                                                                                                                       
ā”œā”€ @pulumi/aws@5.13.0
ā”‚  ā”œā”€ @pulumi/pulumi@^3.0.0
ā”œā”€ @pulumi/awsx@0.40.0
ā”‚  ā”œā”€ @pulumi/docker@^3.0.0
ā”œā”€ @pulumi/docker@3.4.1
ā”‚  ā”œā”€ @pulumi/pulumi@^3.0.0
ā”œā”€ @pulumi/pulumi@3.39.3
ā”‚  ā”œā”€ @pulumi/query@^0.3.0
ā”œā”€ @pulumi/query@0.3.0
root@2dee11220fd3:/data/pulumi#
Copy code
root@2dee11220fd3:/data/pulumi# pulumi version
v3.39.3
Copy code
root@2dee11220fd3:/data/pulumi# cat yarn.lock | grep pul
"@pulumi/aws@5.13.0":
  resolved "<https://PRIVATEREPO.us-west-2.amazonaws.com:443/npm/main/@pulumi/aws/-/aws-5.13.0.tgz#922bcac74d9931cec5ec4147ac03f70301a8269d>"
    "@pulumi/pulumi" "^3.0.0"
"@pulumi/awsx@0.40.0":
  resolved "<https://PRIVATEREPO.us-west-2.amazonaws.com:443/npm/main/@pulumi/awsx/-/awsx-0.40.0.tgz#14da49be027f9208dfc266e5a1d0c65aae74e0e2>"
    "@pulumi/docker" "^3.0.0"
"@pulumi/docker@^3.0.0":
  resolved "<https://PRIVATEREPO.us-west-2.amazonaws.com:443/npm/main/@pulumi/docker/-/docker-3.4.1.tgz#70551e9b4eb7b7b9297db368a4334548b9b1222a>"
    "@pulumi/pulumi" "^3.0.0"
"@pulumi/pulumi@^3.0.0":
  resolved "<https://PRIVATEREPO.us-west-2.amazonaws.com:443/npm/main/@pulumi/pulumi/-/pulumi-3.39.3.tgz#beb51a9be88783ac74b39c3d103b0cd51d210f28>"
    "@pulumi/query" "^0.3.0"
"@pulumi/query@^0.3.0":
  resolved "<https://PRIVATEREPO.us-west-2.amazonaws.com:443/npm/main/@pulumi/query/-/query-0.3.0.tgz#f496608e86a18c3dd31b6c533408e2441c29071d>"
Copy code
root@2dee11220fd3:/data/pulumi/node_modules/@pulumi/aws/lambda# cat runtimes.js | grep NodeJS

...

/** The NodeJS10dXRuntime constant is deprecated, use Runtime.NodeJS10dX instead. */
exports.NodeJS10dXRuntime = "nodejs10.x";
/** The NodeJS12dXRuntime constant is deprecated, use Runtime.NodeJS12dX instead. */
exports.NodeJS12dXRuntime = "nodejs12.x";
exports.NodeJSRuntime = "nodejs";
exports.NodeJS4d3EdgeRuntime = "nodejs4.3-edge";
exports.NodeJS4d3Runtime = "nodejs4.3";
exports.NodeJS6d10Runtime = "nodejs6.10";
exports.NodeJS8d10Runtime = "nodejs8.10";
ok, so yea looks like that file is basically deprecated, and it should go from:
runtime: aws.lambda.NodeJS14dXRuntime,
to
runtime: aws.lambda.Runtime.NodeJS14dX,
seems like that deprecation message should maybe mention that as I didn't realize the type had changed
anyways, problem solved.. thanks for pointing me in right direction šŸ‘
šŸ‘ 1