is Node12 still the latest available runtime in th...
# aws
is Node12 still the latest available runtime in the lambda provider?
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
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:
When I try to use 14 or 16 I get an error saying it's not part if the package
You're importing from the file you linked to, maybe? Have you used Runtime.NodeJS16dX as the value?
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
Can you share code?
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
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
  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,
        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
Copy code
root@2dee11220fd3:/data/pulumi# pulumi version
Copy code
root@2dee11220fd3:/data/pulumi# cat yarn.lock | grep pul
  resolved "<>"
    "@pulumi/pulumi" "^3.0.0"
  resolved "<>"
    "@pulumi/docker" "^3.0.0"
  resolved "<>"
    "@pulumi/pulumi" "^3.0.0"
  resolved "<>"
    "@pulumi/query" "^0.3.0"
  resolved "<>"
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,
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