AWS::Events::EventBus - AWS CloudFormation

AWS::Events::EventBus

Specifies an event bus within your account. This can be a custom event bus which you can use to receive events from your custom applications and services, or it can be a partner event bus which can be matched to a partner event source.

Note

As an aid to help you jumpstart developing CloudFormation templates, the EventBridge console enables you to create templates from the existing event buses in your account. For more information, see Generating CloudFormation templates from an EventBridge event bus in the Amazon EventBridge User Guide.

Syntax

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

JSON

{ "Type" : "AWS::Events::EventBus", "Properties" : { "DeadLetterConfig" : DeadLetterConfig, "Description" : String, "EventSourceName" : String, "KmsKeyIdentifier" : String, "Name" : String, "Policy" : Json, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::Events::EventBus Properties: DeadLetterConfig: DeadLetterConfig Description: String EventSourceName: String KmsKeyIdentifier: String Name: String Policy: Json Tags: - Tag

Properties

DeadLetterConfig

Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).

For more information, see Using dead-letter queues to process undelivered events in the EventBridge User Guide.

Required: No

Type: DeadLetterConfig

Update requires: No interruption

Description

The event bus description.

Required: No

Type: String

Maximum: 512

Update requires: No interruption

EventSourceName

If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.

Required: No

Type: String

Pattern: aws\.partner(/[\.\-_A-Za-z0-9]+){2,}

Minimum: 1

Maximum: 256

Update requires: No interruption

KmsKeyIdentifier

The identifier of the AWS KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.

If you do not specify a customer managed key identifier, EventBridge uses an AWS owned key to encrypt events on the event bus.

For more information, see Managing keys in the AWS Key Management Service Developer Guide.

Note

Archives and schema discovery are not supported for event buses encrypted using a customer managed key. EventBridge returns an error if:

  • You call CreateArchive on an event bus set to use a customer managed key for encryption.

  • You call CreateDiscoverer on an event bus set to use a customer managed key for encryption.

  • You call UpdatedEventBus to set a customer managed key on an event bus with an archives or schema discovery enabled.

To enable archives or schema discovery on an event bus, choose to use an AWS owned key. For more information, see Data encryption in EventBridge in the Amazon EventBridge User Guide.

Required: No

Type: String

Maximum: 2048

Update requires: No interruption

Name

The name of the new event bus.

Custom event bus names can't contain the / character, but you can use the / character in partner event bus names. In addition, for partner event buses, the name must exactly match the name of the partner event source that this event bus is matched to.

You can't use the name default for a custom event bus, as this name is already used for your account's default event bus.

Required: Yes

Type: String

Pattern: [/\.\-_A-Za-z0-9]+

Minimum: 1

Maximum: 256

Update requires: Replacement

Policy

The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.

Required: No

Type: Json

Update requires: No interruption

Tags

Tags to associate with the event bus.

Required: No

Type: Array of Tag

Update requires: No interruption

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.

Examples

Create a partner event bus

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

JSON

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

YAML

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

Create a custom event bus

The following example creates a custom event bus named MyCustomEventBus.

JSON

"SampleCustomEventBus": { "Type": "AWS::Events::EventBus", "Properties": { "Name": "MyCustomEventBus" } }

YAML

SampleCustomEventBus: Type: AWS::Events::EventBus Properties: Name: "MyCustomEventBus"