如何从CloudFormation“资源无法创建”失败中获取详细原因信息(AWS :: ApplicationAutoScaling :: ScalableTarget)

时间:2018-04-01 23:56:04

标签: amazon-cloudformation aws-ecs

我有一个受限制的IAM用户,我正在尝试获得最低限度的权限,以便干净地创建基线ECS CloudFormation参考架构:

https://github.com/aws-samples/ecs-refarch-cloudformation

但是,我无法部署参考堆栈。我收到这个错误:

“Embedded stack arn:aws:cloudformation:us-east-1:*elided*:stack/icc-baselinestack-WebsiteService-*elided*/*elided* was not successfully created: The following resource(s) failed to create: [ServiceScalableTarget].” 

我是CloudFormation的新手,我想知道如何最好地诊断原因。是否有一个地方可以获得有关问题原因的更详细的诊断信息?

FWIW我可以在完全权限的私有AWS账户上部署参考架构,而不会出现任何问题,因为AWS打算使用此参考堆栈。

作为参考,这是service.yaml中的部分,错误指的是:

    ServiceScalableTarget:
        Type: "AWS::ApplicationAutoScaling::ScalableTarget"
        Properties:
            MaxCapacity: !Ref MaxCount
            MinCapacity: !Ref DesiredCount
            ResourceId: !Join
                - /
                - - service
                  - !Ref Cluster
                  - !GetAtt Service.Name
            RoleARN: !Ref ECSServiceAutoScalingRoleARN
            ScalableDimension: ecs:service:DesiredCount
            ServiceNamespace: ecs

这是我的命令行:

aws cloudformation create-stack --capabilities CAPABILITY_NAMED_IAM --stack-name icc-baselinestack  --template-url https://s3.amazonaws.com/ecs-refarch-cloudformation/master.yaml

0 个答案:

没有答案