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