Skip to content

Commit

Permalink
Update Lambda Env Variables
Browse files Browse the repository at this point in the history
Update Lambda Env Variables along with change in Multus-ready workernode GitHub update
  • Loading branch information
jungy-aws authored May 26, 2021
1 parent 8887c32 commit 56ad4ac
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions x86-Architecture/cfn-templates/open5gs-worker-x86.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ Resources:
"ec2:DescribeInstances",
"ec2:DetachNetworkInterface",
"ec2:ModifyNetworkInterfaceAttribute",
"ec2:DescribeSubnets",
"autoscaling:CompleteLifecycleAction",
"ec2:DeleteTags",
"ec2:DescribeNetworkInterfaces",
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 56ad4ac

Please sign in to comment.