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
当部署在堆栈上方时。来自通知规则资源的错误。我没有在模板中输入任何ID属性。请帮忙。