View a markdown version of this page

CreateSubscriber - Amazon EventBridge Custom Event Bus

CreateSubscriber

Creates a subscriber on an event bus, which delivers matching events to the configured target. The bus must be ACTIVE. Retries carrying the same ClientToken are idempotent.

Request Parameters

BatchConfiguration

Batching configuration for a subscriber.

Type: BatchConfiguration object

Required: No

ClientToken

Unique, case-sensitive identifier that ensures the idempotency of the request. The SDK generates one automatically when the field is omitted.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [\u0021-\u007E]+

Required: No

Description

Free-text description. Used by every resource type that has one: event buses, subscribers, and event sources.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 512.

Pattern: [^\u0000-\u001F\u007F-\u009F\u2028\u2029]*(?![\s\S]).*

Required: No

EventBusArn

The Amazon Resource Name (ARN) that uniquely identifies an event bus.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1011.

Pattern: arn:aws(-[a-z0-9]+)*:events:[a-z][a-z0-9]*(-[a-z0-9]+)*:([0-9]{12}):event-busv2\/[A-Za-z0-9][\.\-_A-Za-z0-9]{0,255}\/[a-z0-9]{25}

Required: Yes

FilterConfiguration

Configuration for filtering events delivered to a subscriber. On CreateSubscriber, Filters is required and must contain at least one Filter with a non-empty Pattern. On UpdateSubscriber, an empty FilterConfiguration:{} clears the existing filter. Any non-empty shape (including {Language:X} without Filters) must contain a valid Filters list — same contract as CreateSubscriber. A non-empty Filters list overwrites; an omitted FilterConfiguration preserves existing state. All Filters are implicitly ANDed — an event must match every Filter to be delivered.

Type: FilterConfiguration object

Required: No

InvokeConfiguration

Configuration for how the subscriber invokes its target.

Type: InvokeConfiguration object

Required: Yes

LogConfiguration

Log configuration for a subscriber.

Type: LogConfiguration object

Required: No

Name

Name of a subscriber. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [A-Za-z0-9][\.\-_A-Za-z0-9]*

Required: Yes

OnFailureConfiguration

On-failure configuration: where a failed delivery is sent. Shared by the subscriber and the EventSource.

Type: OnFailureConfiguration object

Required: No

PointInTimeConfiguration

Point-in-time configuration for a subscriber. Only applicable when StartingPosition is POINT_IN_TIME.

Type: PointInTimeConfiguration object

Required: No

RetryPolicy

Retry policy for a subscriber.

Type: RetryPolicy object

Required: No

StartingPosition

Starting position for a subscriber.

Type: String

Valid Values: LATEST | POINT_IN_TIME

Required: No

State

Customer-controlled run state of a subscriber, set on create or update. Distinct from the bus lifecycle vocabulary, where ACTIVE means "provisioned and healthy". Delivery requires State RUNNING on a subscriber that is not revoked.

Type: String

Valid Values: RUNNING | STOPPED

Required: No

Tags

Tags attached to a resource, as key-value pairs.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 200 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: \S([\s\S]*\S)?(?![\s\S]).*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: (\S([\s\S]*\S)?)?(?![\s\S]).*

Required: No

Transformer

Transformer configuration for a subscriber.

Type: Transformer object

Required: No

Type

Delivery ordering mode of a subscriber: FIFO delivers events in order within an event group; UNORDERED delivers without an ordering guarantee.

Type: String

Valid Values: FIFO | UNORDERED

Required: No

Response Elements

The following elements are returned by the service.

CreationTime

The time the subscriber was created.

Type: Timestamp

EventBusArn

The Amazon Resource Name (ARN) that uniquely identifies an event bus.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1011.

Pattern: arn:aws(-[a-z0-9]+)*:events:[a-z][a-z0-9]*(-[a-z0-9]+)*:([0-9]{12}):event-busv2\/[A-Za-z0-9][\.\-_A-Za-z0-9]{0,255}\/[a-z0-9]{25}

Name

Name of a subscriber. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [A-Za-z0-9][\.\-_A-Za-z0-9]*

PointInTimeConfiguration

Point-in-time configuration for a subscriber. Only applicable when StartingPosition is POINT_IN_TIME.

Type: PointInTimeConfiguration object

StartingPosition

Starting position for a subscriber.

Type: String

Valid Values: LATEST | POINT_IN_TIME

State

Customer-controlled run state of a subscriber, set on create or update. Distinct from the bus lifecycle vocabulary, where ACTIVE means "provisioned and healthy". Delivery requires State RUNNING on a subscriber that is not revoked.

Type: String

Valid Values: RUNNING | STOPPED

SubscriberArn

The Amazon Resource Name (ARN) that uniquely identifies a subscriber.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1011.

Pattern: arn:aws(-[a-z0-9]+)*:events:[a-z][a-z0-9]*(-[a-z0-9]+)*:([0-9]{12}):subscriber\/[A-Za-z0-9][\.\-_A-Za-z0-9]{0,255}\/[a-z0-9]{25}

Type

Delivery ordering mode of a subscriber: FIFO delivers events in order within an event group; UNORDERED delivers without an ordering guarantee.

Type: String

Valid Values: FIFO | UNORDERED

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

The caller does not have the permissions required to perform the operation. This error is also returned when the operation cannot use the AWS KMS key for the event bus.

HTTP Status Code: 403

ConcurrentModificationException

Another change to the resource is already in progress. Retry the request.

HTTP Status Code: 409

IdempotentParameterMismatchException

The request reuses the client token of an earlier request with different parameters. Use a new client token, or resend the earlier request unchanged.

HTTP Status Code: 409

InternalException

The request failed because of an internal service error. Retry the request.

HTTP Status Code: 500

InvalidInputException

A request parameter is missing or not valid.

HTTP Status Code: 400

InvalidStateException

The resource is not in a state that allows the operation. For example, an event bus that is still being created cannot accept events.

HTTP Status Code: 409

LimitExceededException

The request would exceed a service quota for the account.

HTTP Status Code: 400

ResourceAlreadyExistsException

A resource with the same name already exists.

HTTP Status Code: 409

ResourceNotFoundException

The resource does not exist.

HTTP Status Code: 404

ThrottlingException

The request was throttled because it exceeds a request rate limit. Retry the request with backoff.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: