KinesisPutRecordAction

class aws_cdk.aws_iot_actions.KinesisPutRecordAction(stream, *, partition_key, role=None)

Bases: object

(experimental) The action to put the record from an MQTT message to the Kinesis Data stream.

Stability:

experimental

ExampleMetadata:

infused

Example:

import aws_cdk.aws_kinesis as kinesis


stream = kinesis.Stream(self, "MyStream")

topic_rule = iot.TopicRule(self, "TopicRule",
    sql=iot.IotSql.from_string_as_ver20160323("SELECT * FROM 'device/+/data'"),
    actions=[
        actions.KinesisPutRecordAction(stream,
            partition_key="${newuuid()}"
        )
    ]
)
Parameters:
  • stream (IStream) – The Kinesis Data stream to which to put records.

  • partition_key (str) – (experimental) The partition key used to determine to which shard the data is written. The partition key is usually composed of an expression (for example, ${topic()} or ${timestamp()}).

  • role (Optional[IRole]) – (experimental) The IAM role that allows access to AWS service. Default: a new role will be created

Stability:

experimental

Methods

bind(rule)

(experimental) Returns the topic rule action specification.

Parameters:

rule (ITopicRule) –

Stability:

experimental

Return type:

ActionConfig