Skip to content

Commit

Permalink
Fix Kinesis Stream EventBridge target
Browse files Browse the repository at this point in the history
  • Loading branch information
BalmungSan authored Jul 25, 2024
1 parent 9d79c51 commit 3518de4
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { singletonEventRole } from './util';
import * as events from '../../aws-events';
import * as iam from '../../aws-iam';
import * as kinesis from '../../aws-kinesis';

/**
Expand Down Expand Up @@ -46,10 +45,7 @@ export class KinesisStream implements events.IRuleTarget {
*/
public bind(_rule: events.IRule, _id?: string): events.RuleTargetConfig {
const role = singletonEventRole(this.stream);
role.addToPrincipalPolicy(new iam.PolicyStatement({
actions: ['kinesis:PutRecord', 'kinesis:PutRecords'],
resources: [this.stream.streamArn],
}));
this.stream.grantWrite(role)

return {
arn: this.stream.streamArn,
Expand Down

0 comments on commit 3518de4

Please sign in to comment.