question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support CloudFormation rollback triggers

See original GitHub issue

CloudFormation supports specifying 0-5 rollback triggers as CloudWatch Metric Alarms, which when triggered will automatically cause the stack update to be cancelled. Also a monitoring time of 0-180 minutes can be specified, which means a pause time CloudFormation will wait for any of the alarms to be triggered, or a rollback to be manually triggered, before cleaning up any resources.

There should be a way to use these with AWS CDK.

Use Case

Rollback triggers have obvious uses to make stack updates more reliable.

Proposed Solution

Similar to --notification-arns currently in deploy command, add --rollback-trigger-alarm-arns option to be able to list 1-5 CloudWatch Alarms that automatically trigger a rollback. Also add --monitoring-time-minutes option which can be used to add 0-180 minutes of pause time after a stack update before the cleanup phase starts. Both options can be specified independently, as they are useful on their own.

Other

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-rollback-triggers.html https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RollbackConfiguration.html

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:72
  • Comments:25 (15 by maintainers)

github_iconTop GitHub Comments

12reactions
jabalsadcommented, Jun 23, 2022

+1

Amazon is clear about the importance of Metrics monitoring and auto-rollback. It is a problem that the primary and recommended tool (CDK) doesn’t let customers integrate with this functionality which cloudformation supports.

I don’t think it makes sense to block all the customers using CDK and Cloudformation because of lack of support in Code Pipelines.

I’d like to echo this sentiment. Two ways in which I think CDK could support rollbacks without the support of CodePipeline is:

  1. By having rollbackAlarmArn and monitoringPeriod fields on a cdk.Stack that gets forwarded to CloudFormation create-change-set and execute-change-set operations during cdk deploy.
  2. Supporting --rollback-alarm-arn and --monitoring-period command-line arguments when running cdk deploy.

At the time when CodePipeline finally supports this integration, these features could be seamlessly integrated with it too.

This unblocks users today who are not using CodePipeline because of this limitation.

4reactions
DanielBauman88commented, Jun 23, 2022

+1

Amazon is clear about the importance of Metrics monitoring and auto-rollback. It is a problem that the primary and recommended tool (CDK) doesn’t let customers integrate with this functionality which cloudformation supports.

I don’t think it makes sense to block all the customers using CDK and Cloudformation because of lack of support in Code Pipelines.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Monitor and roll back stack operations - AWS CloudFormation
Rollback triggers enable you to have AWS CloudFormation monitor the state of your application during stack creation and updating, and to roll back...
Read more >
RollbackTrigger - Amazon CloudFormation - 亚马逊云科技
A rollback trigger Amazon CloudFormation monitors during creation and updating of stacks. If any of the alarms you specify goes to ALARM state...
Read more >
AWS CDK Rollback Triggers - Stack Overflow
Usually, when a feature is missing from CDK, it can be mitigated by escaping to the Cfn* resources. However, rollback triggers are not ......
Read more >
New! Disable Rollback for AWS CloudFormation - CloudHesive
AWS ' native Infrastructure as Code (IaC) service, CloudFormation has a new feature named “Disable Rollback”. Disable Rollback works exactly as it sounds...
Read more >
CloudFormation — Rollbacks - YouTube
SUBSCRIBE to support more free course content like this!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found