Skip to content

Commit e0ebcfe

Browse files
authored
feat(lambda): add Python 3.13 runtime (#32054)
### Issue # (if applicable) NA ### Reason for this change Adds Python 3.13 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 how you validated changes Have added integration tests to validate the runtime support ### Checklist - [ ] 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 a09ccdb commit e0ebcfe

10 files changed

+214
-404
lines changed

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

+3-3
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

+8-118
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,5 @@
11
{
22
"Resources": {
3-
"PYTHON37ServiceRoleDE7E561E": {
4-
"Type": "AWS::IAM::Role",
5-
"Properties": {
6-
"AssumeRolePolicyDocument": {
7-
"Statement": [
8-
{
9-
"Action": "sts:AssumeRole",
10-
"Effect": "Allow",
11-
"Principal": {
12-
"Service": "lambda.amazonaws.com"
13-
}
14-
}
15-
],
16-
"Version": "2012-10-17"
17-
},
18-
"ManagedPolicyArns": [
19-
{
20-
"Fn::Join": [
21-
"",
22-
[
23-
"arn:",
24-
{
25-
"Ref": "AWS::Partition"
26-
},
27-
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
28-
]
29-
]
30-
}
31-
]
32-
}
33-
},
34-
"PYTHON37D3A10E04": {
35-
"Type": "AWS::Lambda::Function",
36-
"Properties": {
37-
"Code": {
38-
"ZipFile": "def handler(event, context):\n return \"success\""
39-
},
40-
"Handler": "index.handler",
41-
"Role": {
42-
"Fn::GetAtt": [
43-
"PYTHON37ServiceRoleDE7E561E",
44-
"Arn"
45-
]
46-
},
47-
"Runtime": "python3.7"
48-
},
49-
"DependsOn": [
50-
"PYTHON37ServiceRoleDE7E561E"
51-
]
52-
},
533
"PYTHON38ServiceRole3EA86BBE": {
544
"Type": "AWS::IAM::Role",
555
"Properties": {
@@ -250,57 +200,7 @@
250200
"PYTHON312ServiceRoleBEB03378"
251201
]
252202
},
253-
"NODEJS14XServiceRole4523ECDB": {
254-
"Type": "AWS::IAM::Role",
255-
"Properties": {
256-
"AssumeRolePolicyDocument": {
257-
"Statement": [
258-
{
259-
"Action": "sts:AssumeRole",
260-
"Effect": "Allow",
261-
"Principal": {
262-
"Service": "lambda.amazonaws.com"
263-
}
264-
}
265-
],
266-
"Version": "2012-10-17"
267-
},
268-
"ManagedPolicyArns": [
269-
{
270-
"Fn::Join": [
271-
"",
272-
[
273-
"arn:",
274-
{
275-
"Ref": "AWS::Partition"
276-
},
277-
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
278-
]
279-
]
280-
}
281-
]
282-
}
283-
},
284-
"NODEJS14X930214A3": {
285-
"Type": "AWS::Lambda::Function",
286-
"Properties": {
287-
"Code": {
288-
"ZipFile": "exports.handler = async function(event) { return \"success\" }"
289-
},
290-
"Handler": "index.handler",
291-
"Role": {
292-
"Fn::GetAtt": [
293-
"NODEJS14XServiceRole4523ECDB",
294-
"Arn"
295-
]
296-
},
297-
"Runtime": "nodejs14.x"
298-
},
299-
"DependsOn": [
300-
"NODEJS14XServiceRole4523ECDB"
301-
]
302-
},
303-
"NODEJS16XServiceRoleB9DAFDFD": {
203+
"PYTHON313ServiceRole907582AC": {
304204
"Type": "AWS::IAM::Role",
305205
"Properties": {
306206
"AssumeRolePolicyDocument": {
@@ -331,23 +231,23 @@
331231
]
332232
}
333233
},
334-
"NODEJS16XDE5DD82D": {
234+
"PYTHON3136F4F65AE": {
335235
"Type": "AWS::Lambda::Function",
336236
"Properties": {
337237
"Code": {
338-
"ZipFile": "exports.handler = async function(event) { return \"success\" }"
238+
"ZipFile": "def handler(event, context):\n return \"success\""
339239
},
340240
"Handler": "index.handler",
341241
"Role": {
342242
"Fn::GetAtt": [
343-
"NODEJS16XServiceRoleB9DAFDFD",
243+
"PYTHON313ServiceRole907582AC",
344244
"Arn"
345245
]
346246
},
347-
"Runtime": "nodejs16.x"
247+
"Runtime": "python3.13"
348248
},
349249
"DependsOn": [
350-
"NODEJS16XServiceRoleB9DAFDFD"
250+
"PYTHON313ServiceRole907582AC"
351251
]
352252
},
353253
"NODEJS18XServiceRole4D18036A": {
@@ -452,11 +352,6 @@
452352
}
453353
},
454354
"Outputs": {
455-
"PYTHON37functionName": {
456-
"Value": {
457-
"Ref": "PYTHON37D3A10E04"
458-
}
459-
},
460355
"PYTHON38functionName": {
461356
"Value": {
462357
"Ref": "PYTHON38A180AE47"
@@ -477,14 +372,9 @@
477372
"Ref": "PYTHON3127B62731D"
478373
}
479374
},
480-
"NODEJS14XfunctionName": {
481-
"Value": {
482-
"Ref": "NODEJS14X930214A3"
483-
}
484-
},
485-
"NODEJS16XfunctionName": {
375+
"PYTHON313functionName": {
486376
"Value": {
487-
"Ref": "NODEJS16XDE5DD82D"
377+
"Ref": "PYTHON3136F4F65AE"
488378
}
489379
},
490380
"NODEJS18XfunctionName": {

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

+1-1
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/integ.json

+5-7
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/lambdaruntimeinlinecodeDefaultTestDeployAssert2C40D679.assets.json

+19
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/lambdaruntimeinlinecodeDefaultTestDeployAssert2C40D679.template.json

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)