1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
【以下的回答经过翻译处理】 对于这些情况的诀窍是构建(一个)ARN作为字符串而不是引用,从而打破循环依赖关系。在您的情况下,如果您去掉SourceArn
并使用通配符,则应该可以工作:
DependsOn:
- LambdaFunction
Type: AWS::Lambda::Permission
Properties:
FunctionName: !GetAtt LambdaFunction.Arn
Action: lambda:InvokeFunction
Principal: elasticloadbalancing.amazonaws.com
SourceArn: !Sub "arn:aws:elasticloadbalancing:${AWS::Region}:${AWS::AccountId}:targetgroup/Bingo/*" # Rather than !Ref ALBTargetGroup
ALBTargetGroup:
DependsOn: ALBLambdaPermission
Type: "AWS::ElasticLoadBalancingV2::TargetGroup"
Properties:
HealthCheckPath: "/"
Name: "Bingo"
TargetType: "lambda"
Targets:
-
Id: !GetAtt LambdaFunction.Arn
Contenus pertinents
- demandé il y a un mois
- demandé il y a 7 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 2 ans