pelican
pelican

Reputation: 6224

AWS cloudformation - Stack exists but with non-updatable status: ROLLBACK_COMPLETE

I'm following this tutorial: https://github.com/awslabs/codepipeline-nested-cfn and running into this error after running the following command:

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

Does anyone have any idea why?

I deleted all stacks and started from a clean slate and the cloudformation stack gets to this part and fails with the error below:

enter image description here

Here's my config-prod.json; everything is similar to this repo except I changed the 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"
   }
}

Upvotes: 7

Views: 12607

Answers (1)

Laurent Jalbert Simard
Laurent Jalbert Simard

Reputation: 6329

Most likely, the stack was not successfully deployed and, therefore, rolled back. You won't be able to update this stack or even create a new one using the same name.

Find this stack in the AWS CloudFormation Console, you might have to adjust the filter to "Failed" in order to find it.

Then, select the stack and look at the "Events" tab for an error message.

Finally, fix whatever issue that caused the rollback at the first place and delete the stack in order to create a new one with the same name.

Upvotes: 6

Related Questions