KinesisStream

class aws_cdk.aws_events_targets.KinesisStream(stream, *, message=None, partition_key_path=None)

Bases: object

Use a Kinesis Stream as a target for AWS CloudWatch event rules.

Example:

# put to a Kinesis stream every time code is committed
# to a CodeCommit repository
repository.on_commit("onCommit", target=targets.KinesisStream(stream))
Parameters:
  • stream (IStream) –

  • message (Optional[RuleTargetInput]) – The message to send to the stream. Must be a valid JSON text passed to the target stream. Default: - the entire CloudWatch event

  • partition_key_path (Optional[str]) – Partition Key Path for records sent to this stream. Default: - eventId as the partition key

Methods

bind(_rule, _id=None)

Returns a RuleTarget that can be used to trigger this Kinesis Stream as a result from a CloudWatch event.

Parameters:
  • _rule (IRule) –

  • _id (Optional[str]) –

Return type:

RuleTargetConfig