Skip to content

Commit 404bf1a

Browse files
authored
feat(lambda): add nodejs24.x runtime for Lambda (#36001)
### Issue # (if applicable) ### Reason for this change Adds Node.js 24 runtime to the available [Lambda Runtimes constants](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Runtime.html#initializer) ### Description of changes Have added integration tests to validate the runtime support ### Describe any new or updated permissions being added N/A ### Description of how you validated changes ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent e48e584 commit 404bf1a

File tree

6 files changed

+255
-22
lines changed

6 files changed

+255
-22
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.runtime.inlinecode.js.snapshot/aws-cdk-lambda-runtime-inlinecode.assets.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.runtime.inlinecode.js.snapshot/aws-cdk-lambda-runtime-inlinecode.template.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,56 @@
399399
"DependsOn": [
400400
"NODEJS22XServiceRole8FE2F7A5"
401401
]
402+
},
403+
"NODEJS24XServiceRoleF97C2B58": {
404+
"Type": "AWS::IAM::Role",
405+
"Properties": {
406+
"AssumeRolePolicyDocument": {
407+
"Statement": [
408+
{
409+
"Action": "sts:AssumeRole",
410+
"Effect": "Allow",
411+
"Principal": {
412+
"Service": "lambda.amazonaws.com"
413+
}
414+
}
415+
],
416+
"Version": "2012-10-17"
417+
},
418+
"ManagedPolicyArns": [
419+
{
420+
"Fn::Join": [
421+
"",
422+
[
423+
"arn:",
424+
{
425+
"Ref": "AWS::Partition"
426+
},
427+
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
428+
]
429+
]
430+
}
431+
]
432+
}
433+
},
434+
"NODEJS24X3400670E": {
435+
"Type": "AWS::Lambda::Function",
436+
"Properties": {
437+
"Code": {
438+
"ZipFile": "exports.handler = async function(event) { return \"success\" }"
439+
},
440+
"Handler": "index.handler",
441+
"Role": {
442+
"Fn::GetAtt": [
443+
"NODEJS24XServiceRoleF97C2B58",
444+
"Arn"
445+
]
446+
},
447+
"Runtime": "nodejs24.x"
448+
},
449+
"DependsOn": [
450+
"NODEJS24XServiceRoleF97C2B58"
451+
]
402452
}
403453
},
404454
"Outputs": {
@@ -441,6 +491,11 @@
441491
"Value": {
442492
"Ref": "NODEJS22X911196A1"
443493
}
494+
},
495+
"NODEJS24XfunctionName": {
496+
"Value": {
497+
"Ref": "NODEJS24X3400670E"
498+
}
444499
}
445500
},
446501
"Parameters": {

0 commit comments

Comments
 (0)