Managing events with AWS CloudFormation and Amazon EventBridge - AWS CloudFormation

Managing events with AWS CloudFormation and Amazon EventBridge

AWS CloudFormation can send events to Amazon EventBridge whenever a create, update, delete, or drift-detection action performs on your stack. Unlike other destinations, you don't need to select which event types you want to deliver. You can use EventBridge rules to route events to your defined targets. These events will be delivered on a best-effort basis, and they might be delivered out of order.

Discover CloudFormation events and setup additional workflows based on those events. CloudFormation provides information about changes about a CloudFormation stack and its resources, so you can subscribe to and imitate workflows associated with respective events. For example:

  • Create stack specific tags on all resource provisioned through AWS CloudFormation.

  • Establish an association between a CloudFormation stack and an Amazon WorkSpaces Application Manager (Amazon WAM).

  • Specify an association with an AWS Service Catalog AppRegistry for the created Stack.

By interacting with resources post provisioning, you ensure resource configurations aligns with your business objectives of the workload and adheres to security compliance standards, meeting required reliability metrics, and aligning with cost and budget allocations.

Supported events

All events are provided by the create, update, delete (CUD), and drift-detection actions associated with stack operations. For more information, see Event type message structure.

The following events are supported by CloudFormation.

Event type Description
Resource status Any updates performed on a stack which changes underlying resource properties. For a complete list of supported AWS resource types, see AWS resource and property types reference
Stack status Any status change updates on a stack provisioned by the user. For a complete list of stack status codes, see Stack status codes.
Drift detection status

User initiated drift detection updates on Stacks. For a complete list of fully mutable and immutable types that support drift detection, see Resources that support import and drift detection operations

There are two major steps to manage events with CloudFormation and EventBridge:

  • Updating resources within an application context If a supported event type occurs, the event message is sent to EventBridge.

  • Viewing the application context AWS services and users can view the application context of the supported event.

Note

The default event bus in each account receives events from AWS services.