AWS CloudFormation
User Guide (Version )

AWS::Events::EventBus

The AWS::Events::EventBus resource creates or updates a partner event bus or custom event bus. Partner event buses can receive events from applications and services created by AWS SaaS partners. You need to create a partner event bus for each partner event source that you want to receive events from.

Custom event buses can receive events from your own custom applications.

To review the limit for how many rules each event bus may have, see Service Limits.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::Events::EventBus", "Properties" : { "EventSourceName" : String, "Name" : String } }

YAML

Type: AWS::Events::EventBus Properties: EventSourceName: String Name: String

Properties

EventSourceName

The name of the partner event source to associate with this event bus, if you are creating a partner event bus.

Required: Conditional

Type: String

Update requires: Replacement

Name

The name of the event bus you are creating. The names of custom event buses can't contain the / character. You can't use the name default for a custom event bus.

If you are creating a partner event bus, this name must exactly match the name of the partner event source that this bus is matched to.

Required: Yes

Type: String

Update requires: Replacement

Return Values

Ref

The name of the new event bus.

Fn::GetAtt

The ARN of the task definition to use. If no task revision is supplied, it defaults to the most recent revision at the time of resource creation.

Arn

The ARN of the event bus, such as arn:aws:events:us-east-2:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1.

Name

The name of the event bus, such as PartnerName/acct1/repo1.

Policy

The policy for the event bus in JSON form.

Examples

Create a partner event bus

The following example creates a partner event bus named aws.partner/PartnerName/acct1/repo1.

JSON

"SamplePartnerEventBus": { "Type": "AWS::Events::EventBus", "Properties": { "EventSourceName": "aws.partner/PartnerName/acct1/repo1", "Name": "aws.partner/PartnerName/acct1/repo1" } }

YAML

SamplePartnerEventBus: Type: AWS::Events::EventBus Properties: EventSourceName: "aws.partner/PartnerName/acct1/repo1" Name: "aws.partner/PartnerName/acct1/repo1"

Create a custom event bus

The following example creates a custom event bus named MyCustomEventBus.

JSON

"SampleCustomEventBus": { "Type": "AWS::Events::EventBus", "Properties": { "Name": "aws.partner/PartnerName/acct1/repo1" } }

YAML

SampleCustomEventBus: Type: AWS::Events::EventBus Properties: Name: "aws.partner/PartnerName/acct1/repo1"