AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

EventBusPolicy

The policy for an Event Bus. Policies define the operations that are allowed on this resource. You almost never need to define this construct directly. All AWS resources that support resource policies have a method called `addToResourcePolicy()`, which will automatically create a new resource policy if one doesn't exist yet, otherwise it will add to the existing policy. Prefer to use `addToResourcePolicy()` instead.

Import

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

Or use the module namespace:

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

Properties

Configuration passed to the constructor as EventBusPolicyProps.

eventBusRequired
IEventBus

The event bus to which the policy applies.

statementRequired
PolicyStatement

An IAM Policy Statement to apply to the Event Bus.

statementIdRequired
string

An identifier string for the external account that you are granting permissions to.

Get the Amazon EventBridge Cheat Sheet

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

Download Free Infographic