Skip to content

Commit

Permalink
feat(lambda): add Python 3.13 runtime (#32054)
Browse files Browse the repository at this point in the history
### 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*
  • Loading branch information
Vandita2020 authored Nov 8, 2024
1 parent a09ccdb commit e0ebcfe
Show file tree
Hide file tree
Showing 10 changed files with 214 additions and 404 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,55 +1,5 @@
{
"Resources": {
"PYTHON37ServiceRoleDE7E561E": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
}
}
],
"Version": "2012-10-17"
},
"ManagedPolicyArns": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
]
]
}
]
}
},
"PYTHON37D3A10E04": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Code": {
"ZipFile": "def handler(event, context):\n return \"success\""
},
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"PYTHON37ServiceRoleDE7E561E",
"Arn"
]
},
"Runtime": "python3.7"
},
"DependsOn": [
"PYTHON37ServiceRoleDE7E561E"
]
},
"PYTHON38ServiceRole3EA86BBE": {
"Type": "AWS::IAM::Role",
"Properties": {
Expand Down Expand Up @@ -250,57 +200,7 @@
"PYTHON312ServiceRoleBEB03378"
]
},
"NODEJS14XServiceRole4523ECDB": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
}
}
],
"Version": "2012-10-17"
},
"ManagedPolicyArns": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
]
]
}
]
}
},
"NODEJS14X930214A3": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Code": {
"ZipFile": "exports.handler = async function(event) { return \"success\" }"
},
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"NODEJS14XServiceRole4523ECDB",
"Arn"
]
},
"Runtime": "nodejs14.x"
},
"DependsOn": [
"NODEJS14XServiceRole4523ECDB"
]
},
"NODEJS16XServiceRoleB9DAFDFD": {
"PYTHON313ServiceRole907582AC": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
Expand Down Expand Up @@ -331,23 +231,23 @@
]
}
},
"NODEJS16XDE5DD82D": {
"PYTHON3136F4F65AE": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Code": {
"ZipFile": "exports.handler = async function(event) { return \"success\" }"
"ZipFile": "def handler(event, context):\n return \"success\""
},
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"NODEJS16XServiceRoleB9DAFDFD",
"PYTHON313ServiceRole907582AC",
"Arn"
]
},
"Runtime": "nodejs16.x"
"Runtime": "python3.13"
},
"DependsOn": [
"NODEJS16XServiceRoleB9DAFDFD"
"PYTHON313ServiceRole907582AC"
]
},
"NODEJS18XServiceRole4D18036A": {
Expand Down Expand Up @@ -452,11 +352,6 @@
}
},
"Outputs": {
"PYTHON37functionName": {
"Value": {
"Ref": "PYTHON37D3A10E04"
}
},
"PYTHON38functionName": {
"Value": {
"Ref": "PYTHON38A180AE47"
Expand All @@ -477,14 +372,9 @@
"Ref": "PYTHON3127B62731D"
}
},
"NODEJS14XfunctionName": {
"Value": {
"Ref": "NODEJS14X930214A3"
}
},
"NODEJS16XfunctionName": {
"PYTHON313functionName": {
"Value": {
"Ref": "NODEJS16XDE5DD82D"
"Ref": "PYTHON3136F4F65AE"
}
},
"NODEJS18XfunctionName": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e0ebcfe

Please sign in to comment.