Review CloudFormation stack notifications

Deliver CloudFormation stack events through the notification path needed for operations, and verify failure and rollback notifications.

Description

Omitting notification_arns leaves stack events available in CloudFormation. Check whether an existing route, such as SNS or EventBridge, alerts the team to failures and rollbacks.

Potential impact

When events do not reach the stack’s owner, failed deployments or unexpected changes can go unnoticed.

Remediation

If SNS is needed, set the operational topic ARN, allow publishing and subscribe the recipients. Verify they receive failure and rollback events, and update subscriptions when ownership changes. Keep a separate process for approving changes and preventing failed deployments.

Examples

Both excerpts omit the template_body or template_url needed for deployment. Supply a template that defines VPCCidr.

Before

hcl
resource "aws_cloudformation_stack" "example" {
  name = "networking-stack"

  parameters = {
    VPCCidr = "10.0.0.0/16"
  }
}

After

hcl
resource "aws_cloudformation_stack" "example" {
  name = "networking-stack"

  parameters = {
    VPCCidr = "10.0.0.0/16"
  }

  notification_arns = ["arn:aws:sns:us-east-1:123456789012:stack-events"]
}

The second excerpt adds the stack-events topic in us-east-1.

References