aws-events-rule-kinesisstreams - AWS Solutions Constructs


All classes are under active development and subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.

Language Package


This AWS Solutions Construct implements an Amazon CloudWatch Events rule to send data to an Amazon Kinesis Data Stream.

Here is a minimal deployable pattern definition in TypeScript:

import * as cdk from '@aws-cdk/core'; import {EventsRuleToKinesisStreams, EventsRuleToKinesisStreamsProps} from "@aws-solutions-constructs/aws-events-rule-kinesisstreams"; const props: EventsRuleToKinesisStreamsProps = { eventRuleProps: { schedule: events.Schedule.rate(Duration.minutes(5)), } }; new EventsRuleToKinesisStreams(this, 'test-events-rule-kinesis-stream', props);


new EventsRuleToKinesisStreams(scope: Construct, id: string, props: EventsRuleToKinesisStreamsProps);


Pattern Construct Props

Name Type Description
eventRuleProps events.RuleProps User-provided properties to override the default properties for the CloudWatch Events rule.
existingStreamObj? kinesis.Stream An optional, existing Kinesis stream to be used instead of the default stream. If an existing stream is provided, the kinesisStreamProps property will be ignored.
kinesisStreamProps? kinesis.StreamProps Optional user-provided props to override the default props for the Kinesis stream.
createCloudWatchAlarms boolean Whether to create recommended CloudWatch alarms.

Pattern Properties

Name Type Description
eventsRule events.Rule Returns an instance of the Events rule created by the pattern.
kinesisStream kinesis.Stream Returns an instance of the Kinesis stream created by the pattern.
eventsRole? iam.Role Returns an instance of the role created by the construct for the CloudWatch Events rule.

Default settings

Out-of-the-box implementation of this pattern without any overrides will set the following defaults:

Amazon CloudWatch Events rule

  • Configure least privilege access IAM role for Events Rule to publish to the Kinesis Data Stream.

Amazon Kinesis Stream

  • Enable server-side encryption for Kinesis Data Stream using AWS Managed KMS Key.



To view the code for this pattern, create/view issues and pull requests, and more: