We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23c8f80 commit 2a06e42Copy full SHA for 2a06e42
packages/@aws-cdk/aws-events/README.md
@@ -186,3 +186,17 @@ bus.archive('MyArchive', {
186
retention: cdk.Duration.days(365),
187
});
188
```
189
+
190
+## Granting PutEvents to an existing EventBus
191
192
+To import an existing EventBus into your CDK application, use `EventBus.fromEventBusArn` or `EventBus.fromEventBusAttributes`
193
+factory method.
194
195
+Then, you can use the `grantPut` method to grant `event:PutEvents` to the eventBus.
196
197
+```ts
198
+const eventBus = EventBus.fromEventBusArn(this, 'ImportedEventBus', 'arn:aws:events:us-east-1:111111111:event-bus/my-event-bus');
199
200
+// now you can just call methods on the eventbus
201
+eventBus.grantPut(lambdaFunction);
202
+```
0 commit comments