cfn信号在Ubuntu堆栈超时中不起作用

问题描述 投票:1回答:1
TestInstance:
  Type: AWS::EC2::Instance
  CreationPolicy:
    ResourceSignal:
      Timeout: PT5M
  Properties:                
    ImageId: ami-02a599eb01e3b3c5b      
    InstanceType: t2.micro
    KeyName: TestKey   
    SecurityGroupIds: !Ref sg
    UserData: 
      Fn::Base64: |
          #!/bin/bash -x               
          apt install -y python-pip
          pip install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz                                              
          /opt/aws/bin/cfn-signal -e $? --stack teststack --resource TestInstance --region ap-southeast-2
amazon-web-services amazon-cloudformation
1个回答
0
投票
您对cfn-signal的使用不正确。这是因为它在Ubuntu上比在Amazon Linux上具有

不同位置

© www.soinside.com 2019 - 2024. All rights reserved.