AWS CloudFormation

CloudFormation

Broken stacks

If you see this error when running pipelines, it means that the stack is in a broken state.

ERROR Stack was found in a broken state of (UPDATE_ROLLBACK_FAILED)
ERROR Job 12345678 finished with status: Failed

In that case, you will have to delete the stack and run the pipeline again.

How to delete the stack? Go to CloudFormation in AWS Console and search for the name of the stack. After it shows up, delete it and wait for it to be completely deleted. And run the pipeline again.

TODO

  1. CloudFormation project
    1. Usually, there will be a separate repository for “infra”
  2. There will be manifest.yaml and generalParameters.yaml files in each application.
  3. How do the applications use them when deployed in ECS clusters?

Parameters

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html

Resources

  1. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html
  2. https://docs.aws.amazon.com/cli/latest/reference/ssm/index.html#cli-aws-ssm
  3. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html
  4. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html
  5. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html
  6. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html
  7. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html
  8. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html
  9. https://theburningmonk.com/cloudformation-ref-and-getatt-cheatsheet/