From 56ad4ac606d108223911f73c2b28f61b45f29eb0 Mon Sep 17 00:00:00 2001 From: Young Jung <72177615+jungy-aws@users.noreply.github.com> Date: Wed, 26 May 2021 10:52:09 -0500 Subject: [PATCH] Update Lambda Env Variables Update Lambda Env Variables along with change in Multus-ready workernode GitHub update --- .../cfn-templates/open5gs-worker-x86.yaml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/x86-Architecture/cfn-templates/open5gs-worker-x86.yaml b/x86-Architecture/cfn-templates/open5gs-worker-x86.yaml index a3280e4..53045b2 100644 --- a/x86-Architecture/cfn-templates/open5gs-worker-x86.yaml +++ b/x86-Architecture/cfn-templates/open5gs-worker-x86.yaml @@ -652,6 +652,7 @@ Resources: "ec2:DescribeInstances", "ec2:DetachNetworkInterface", "ec2:ModifyNetworkInterfaceAttribute", + "ec2:DescribeSubnets", "autoscaling:CompleteLifecycleAction", "ec2:DeleteTags", "ec2:DescribeNetworkInterfaces", @@ -675,7 +676,7 @@ Resources: LambdaAttach2ndENI: Type: "AWS::Lambda::Function" Properties: - Runtime: "python2.7" + Runtime: "python3.8" Handler: "lambda_function.lambda_handler" Role: !GetAtt RoleLambdaAttach2ndEniCfn.Arn Code: @@ -684,18 +685,8 @@ Resources: Timeout: "60" Environment: Variables: - SubnetId1: - Fn::ImportValue: - !Sub "${InfraStackName}-MultusSubnet1Az1" - SubnetId2: - Fn::ImportValue: - !Sub "${InfraStackName}-MultusSubnet2Az1" - SecGroupId1: - Fn::ImportValue: - !Sub "${InfraStackName}-MultusSecurityGroup" - SecGroupId2: - Fn::ImportValue: - !Sub "${InfraStackName}-MultusSecurityGroup" + SubnetIds: !Join [",", [Fn::ImportValue: !Sub "${InfraStackName}-MultusSubnet1Az1", Fn::ImportValue: !Sub "${InfraStackName}-MultusSubnet2Az1"]] + SecGroupIds: !Join [",", [Fn::ImportValue: !Sub "${InfraStackName}-MultusSecurityGroup"]] # End of Lambda # CloudWatch Event Trigger @@ -756,7 +747,7 @@ Resources: cfnresponse.send(event, context, cfnresponse.SUCCESS, responseData, "CustomResourcePhysicalID") Handler: index.handler - Runtime: "python3.6" + Runtime: "python3.8" Timeout: "60" Role: !GetAtt RoleLambdaAttach2ndEniCfn.Arn