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属性。请帮忙。
答案 0 :(得分:-1)