AWS CloudFormation enables you to configure and manage your AWS resources across accounts and regions in a centralized and repeatable manner by treating infrastructure as code. CloudFormation does this by letting you create templates, which define the resources you want to provision and manage. These resources can include EventBridge artifacts such as event buses and rules, pipes, schemas, and schedules, among others. Use these resources to include EventBridge functionality in the technology stacks you provision and manage through CloudFormation.
Amazon EventBridge resources available in
AWS CloudFormation
EventBridge provides resources for use in CloudFormation templates in the following resource namespaces:
-
Template examples include:
-
Template examples include:
Generating Amazon EventBridge
resource definitions for AWS CloudFormation templates
As an aid to help you jumpstart developing CloudFormation templates, the EventBridge console enables you to create CloudFormation templates from the existing event buses, rules, and pipes in your account.
Bringing the default event bus under AWS CloudFormation management
Because EventBridge provisions the default event bus into your account automatically, you cannot create it using a CloudFormation template, as you normally would for any resource you wanted to include in a CloudFormation stack. To include the default event bus in a CloudFormation stack, you must first import it into a stack. Once you have imported the default event bus into a stack, you can then update the event bus properties as desired.
For more information, see Updating a default event bus using AWS CloudFormation in EventBridge
Managing AWS CloudFormation stack events using EventBridge
Beyond including EventBridge resources in your CloudFormation stacks, you can use EventBridge to manage the events generated by CloudFormation stacks themselves. CloudFormation sends events to EventBridge whenever a create, update, delete, or drift-detection operation is performed on a stack. CloudFormation also sends events to EventBridge for status changes to stack sets and stack set instances. You can use EventBridge rules to route events to your defined targets.
For more information, see Managing CloudFormation events using EventBridge in the AWS CloudFormation User Guide.