属性ID不能为空AWS CloudFormation

时间:2018-10-22 06:18:05

标签: amazon-web-services amazon-cloudformation


  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属性。请帮忙。