Skip to content

Commit

Permalink
feat(lambda): add Runtime.RUBY_3_2 (#25817)
Browse files Browse the repository at this point in the history
Adds `ruby 3.2` to the available [Lambda Runtimes constants](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Runtime.html#initializer)


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
MrArnoldPalmer committed Jun 1, 2023
1 parent 28c5824 commit 33c820b
Show file tree
Hide file tree
Showing 23 changed files with 4,248 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"version": "32.0.0",
"files": {
"ae370e1010629b78f494346f49ceef3ab2875718f20e6c808114e6aa770c7bf3": {
"source": {
"path": "asset.ae370e1010629b78f494346f49ceef3ab2875718f20e6c808114e6aa770c7bf3.bundle",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "ae370e1010629b78f494346f49ceef3ab2875718f20e6c808114e6aa770c7bf3.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
"65e94012d30f57d4ba56d43d5606a65cfdba74f47f88c81af61a60be3fd0bbf9": {
"source": {
"path": "IntegTestDefaultTestDeployAssertE3E7D2A4.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "65e94012d30f57d4ba56d43d5606a65cfdba74f47f88c81af61a60be3fd0bbf9.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
}
},
"dockerImages": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
{
"Resources": {
"LambdaInvokeec8ae1d1a74c1e6701caf81677da8383": {
"Type": "Custom::DeployAssert@SdkCallLambdainvoke",
"Properties": {
"ServiceToken": {
"Fn::GetAtt": [
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F",
"Arn"
]
},
"service": "Lambda",
"api": "invoke",
"expected": "{\"$ObjectLike\":{\"Payload\":\"{\\\"statusCode\\\":200,\\\"body\\\":\\\"\\\\\\\"Hello from Lambda!\\\\\\\"\\\"}\"}}",
"parameters": {
"FunctionName": {
"Fn::ImportValue": "lambda-test-assets-file:ExportsOutputRefMyRubyLambdaAFED834FC50AFB5F"
}
},
"flattenResponse": "false",
"salt": "1684943375556"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"LambdaInvokeec8ae1d1a74c1e6701caf81677da8383Invoke42FF4B85": {
"Type": "AWS::Lambda::Permission",
"Properties": {
"Action": "lambda:InvokeFunction",
"FunctionName": {
"Fn::ImportValue": "lambda-test-assets-file:ExportsOutputRefMyRubyLambdaAFED834FC50AFB5F"
},
"Principal": {
"Fn::GetAtt": [
"SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73",
"Arn"
]
}
}
},
"SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
}
}
]
},
"ManagedPolicyArns": [
{
"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
}
],
"Policies": [
{
"PolicyName": "Inline",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"lambda:Invoke"
],
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Action": [
"lambda:InvokeFunction"
],
"Effect": "Allow",
"Resource": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":lambda:",
{
"Ref": "AWS::Region"
},
":",
{
"Ref": "AWS::AccountId"
},
":function:",
{
"Fn::ImportValue": "lambda-test-assets-file:ExportsOutputRefMyRubyLambdaAFED834FC50AFB5F"
}
]
]
}
]
}
]
}
}
]
}
},
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Runtime": "nodejs14.x",
"Code": {
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "ae370e1010629b78f494346f49ceef3ab2875718f20e6c808114e6aa770c7bf3.zip"
},
"Timeout": 120,
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73",
"Arn"
]
}
}
}
},
"Outputs": {
"AssertionResultsLambdaInvokeec8ae1d1a74c1e6701caf81677da8383": {
"Value": {
"Fn::GetAtt": [
"LambdaInvokeec8ae1d1a74c1e6701caf81677da8383",
"assertion"
]
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}

0 comments on commit 33c820b

Please sign in to comment.