【发布时间】:2018-10-22 06:18:05
【问题描述】:
NotifierRule:
Type: "AWS::Events::Rule"
Properties:
Description: "Instance state change trigger for EC2 and RDS."
EventPattern:
source:
- "aws.ec2"
detail-type:
- "EC2 Instance State-change Notification"
detail:
state:
- "shutting-down"
- "stopped"
- "stopping"
- "terminated"
instance-id: !Ref EC2Instances
Name: "InstanceHealthState-Monitoring-Rule"
State: "ENABLED"
Targets:
- Arn:
Fn::GetAtt:
- "LambdaNotifier"
- "Arn"
在堆栈上方部署时,我收到了Property Id cannot be empty。错误来自 NotifierRule 资源。我没有在模板中找到任何 Id 属性。请帮忙。
【问题讨论】:
-
您是否截断了
Targets的底部?Targets需要Id。 docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/… -
没有。我没有。我错过了那个。现在我的堆栈已成功部署,lambda 函数没有得到执行。它显示 FailedInvocation。
-
Id的建议是否解决了错误Property Id cannot be empty?
标签: amazon-web-services amazon-cloudformation