Menu
AWS IoT
Developer Guide

Kinesis Action

The kinesis action allows you to write data from MQTT messages into a Kinesis stream. When creating an AWS IoT rule with a kinesis action, you must specify the following information:

stream

The Kinesis stream to which to write data.

partitionKey

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()}").

Note

Ensure that the policy associated with the rule has the kinesis:PutRecord permission.

The following JSON example shows how to define a kinesis action in an AWS IoT rule:

{ "rule": { "sql": "SELECT * FROM 'some/topic'", "ruleDisabled": false, "actions": [{ "kinesis": { "roleArn": "arn:aws:iam::123456789012:role/aws_iot_kinesis", "streamName": "my_kinesis_stream", "partitionKey": "${topic()}" } }], } }

For more information, see the Kinesis Developer Guide.