首页 文章

AWS cloudformation - 存在堆栈但具有不可更新状态:ROLLBACK_COMPLETE

提问于
浏览
0

我正在按照本教程:https://github.com/awslabs/codepipeline-nested-cfn并在运行以下命令后遇到此错误:

aws cloudformation create-stack --stack-name NestedCFN-CodePipeline --template-body file://codepipeline-cfn-codebuild.yml --parameters file://codepipeline-cfn-codebuild.json --capabilities CAPABILITY_NAMED_IAM

enter image description here

有谁知道为什么?

我删除了所有堆栈并从一个干净的平板开始,并且cloudformation堆栈到达此部分并因以下错误而失败:

enter image description here

这是我的config-prod.json;一切都类似于这个回购,除了我更改了amiID:https://github.com/awslabs/codepipeline-nested-cfn

{  
   "Parameters":{  
      "TemplatePath":"TEMPLATE_PATH_PLACEHOLDER",
      "VPCID":"vpc-4d08af25",
      "PrivateSubnet1":"subnet-a2e74bca",
      "PrivateSubnet2":"subnet-3d21c647",
      "PublicSubnet1":"subnet-69e44801",
      "PublicSubnet2":"subnet-c726c1bd",
      "S3BucketName":"nestedcfnbasestack-s3bucket-uvh827b8uyjw",
      "KeyPair":"testKeyName",
      "AMIId":"ami-f63b1193",
      "WebInstanceType":"t2.large",
      "WebMinSize":"1",
      "WebMaxSize":"2",
      "DBSubnetGroup":"nestedcfnbasestack-rdssubnetgroup-q0th4tfkt4m8",
      "DBUsername":"dbadmin",
      "DBPassword":"dbpAssw0rd",
      "DBInstanceType":"db.t2.small",
      "Environment":"prod"
   }
}

1 回答

  • 1

    最有可能的是,堆栈未成功部署,因此回滚 . 您将无法更新此堆栈,甚至无法使用相同的名称创建新堆栈 .

    AWS CloudFormation Console中找到此堆栈,您可能必须将过滤器调整为“Failed”才能找到它 .

    然后,选择堆栈并查看“事件”选项卡以获取错误消息 .

    最后,修复导致首先回滚的任何问题并删除堆栈以创建具有相同名称的新堆栈 .

相关问题