Reputation: 6224
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
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:
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
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