AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Events::EventBusPolicy

CfnEventBusPolicy

Running `PutPermission` permits the specified AWS account or AWS organization to put events to the specified *event bus* . Amazon EventBridge rules in your account are triggered by these events arriving to an event bus in your account. For another account to send events to your account, that external account must have an EventBridge rule with your account's event bus as a target. To enable multiple AWS accounts to put events to your event bus, run `PutPermission` once for each of these accounts. Or, if all the accounts are members of the same AWS organization, you can run `PutPermission` once specifying `Principal` as "*" and specifying the AWS organization ID in `Condition` , to grant permissions to all accounts in that organization. If you grant permissions using an organization, then accounts in that organization must specify a `RoleArn` with proper permissions when they use `PutTarget` to add your account's event bus as a target. For more information, see [Sending and Receiving Events Between AWS Accounts](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) in the *Amazon EventBridge User Guide* . The permission policy on the event bus cannot exceed 10 KB in size.

Import

import { CfnEventBusPolicy } from 'aws-cdk-lib/aws-events';

Or use the module namespace:

import * as events from 'aws-cdk-lib/aws-events';
// events.CfnEventBusPolicy

Properties

Configuration passed to the constructor as CfnEventBusPolicyProps.

statementIdRequired
string

An identifier string for the external account that you are granting permissions to. If you later want to revoke the permission for this external account, specify this `StatementId` when you run [RemovePermission](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_RemovePermission.html) . > Each `StatementId` must be unique.

actionOptionalDeprecated
string

The action that you are enabling the other account to perform.

Deprecated: this property has been deprecated

conditionOptionalDeprecated
IResolvable | ConditionProperty

This parameter enables you to limit the permission to accounts that fulfill a certain condition, such as being a member of a certain AWS organization.

Deprecated: this property has been deprecated

eventBusNameOptional
string

The name of the event bus associated with the rule. If you omit this, the default event bus is used.

principalOptionalDeprecated
string

The 12-digit AWS account ID that you are permitting to put events to your default event bus. Specify "*" to permit any account to put events to your default event bus.

Deprecated: this property has been deprecated

statementOptional
any

A JSON string that describes the permission policy statement. You can include a `Policy` parameter in the request instead of using the `StatementId` , `Action` , `Principal` , or `Condition` parameters.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon EventBridge Cheat Sheet

Everything you need to know about Amazon EventBridge on one page. HD quality, print-friendly.

Download Free Infographic