{
  "slug": "cdk-deploy-supports-cloudformation-rollback-triggers-4c46adc33d84",
  "title": "CDK deploy supports CloudFormation rollback triggers",
  "tools": [
    "cdk"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-20T00:12:59.000Z",
  "announced_at": "2026-10-20T00:12:59.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When deploying a stack that should roll back if a monitored alarm breaches, configure `rollbackConfiguration` or pass alarm ARNs and a monitoring period to `cdk deploy`. Use the programmatic API to specify composite alarms; CLI alarm ARNs are treated as metric alarms.",
    "examples": [
      "cdk deploy <stack> --rollback-trigger-alarm-arns <alarm-arn-1> <alarm-arn-2> --monitoring-time-minutes <minutes>",
      "await toolkit.deploy(cloudAssemblySource, { rollbackConfiguration: { triggers: [{ arn: '<alarm-arn>', type: RollbackTriggerType.COMPOSITE_ALARM }], monitoringTimeInMinutes: 15 } });"
    ],
    "gotchas": [
      "Version: 2.1146.0",
      "--rollback-trigger-alarm-arns <ARN...>: CloudWatch alarm ARNs to monitor; maximum 5. CLI treats them as metric alarms. Pass the single value `none` to clear previously configured triggers.",
      "--monitoring-time-minutes <number>: Whole number from 0 to 180 for monitoring after deployment; the CLI option must be used together with `--rollback-trigger-alarm-arns`.",
      "rollbackConfiguration.triggers: List of rollback triggers; up to 5. Each trigger has a required `arn` and optional `type`; supported types are `AWS::CloudWatch::Alarm` and `AWS::CloudWatch::CompositeAlarm`. `type` defaults to metric alarm. The docs do not state that the types are mutually exclusive.",
      "rollbackConfiguration.monitoringTimeInMinutes: Monitoring period after the stack operation completes; defaults to CloudFormation's 0 minutes, maximum 180.",
      "rollbackConfiguration: `undefined` leaves rollback configuration unmanaged; `{ triggers: [] }` clears existing triggers; `{ triggers: [...] }` sets the provided triggers.",
      "Prerequisite: CDK deployment requires configured AWS credentials, a bootstrapped AWS environment, a configured environment for each stack, and an app with at least one stack.",
      "At most 5 triggers are allowed.",
      "Alarm ARNs must be valid.",
      "Monitoring time must be from 0 to 180 minutes.",
      "CLI alarm ARNs default to metric alarms; composite alarms are reachable via the programmatic API."
    ]
  },
  "why_it_matters": "Configure rollback triggers when deploying a stack that should roll back if a CloudWatch alarm breaches.",
  "sources": [
    "https://github.com/aws/aws-cdk-cli/releases/tag/aws-cdk%40v2.1146.0",
    "https://github.com/aws/aws-cdk-cli/pull/1881",
    "https://raw.githubusercontent.com/aws/aws-cdk-cli/133dfa467eb69b3317e8fbfffe4b275d512c2d95/packages/aws-cdk/lib/cli/cli-type-registry.json",
    "https://raw.githubusercontent.com/aws/aws-cdk-cli/133dfa467eb69b3317e8fbfffe4b275d512c2d95/packages/%40aws-cdk/toolkit-lib/lib/actions/deploy/index.ts",
    "https://docs.aws.amazon.com/cdk/v2/guide/deploy.html"
  ],
  "rank": 0.98032,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "daily-20261026-04",
    "verdict_id": "daily-20261026-04:daily-20261026-04-d22040b290606145-0:gate",
    "evidence_hash": "a6df5d2b4a85774c9c9d98d2c038599b44fffa96403efbd82da4e52ab772dc44"
  },
  "review": {
    "draft_hash": "ff7426f0d4d1bc550fff35b9c5d28de7448cbb2b9cbed3b8beca63dfb16ea72e",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-20T00:12:59.000Z",
    "decision": "daily-20261026-04:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.80 (>= 0.6 needed)."
  }
}
