A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://docs.aws.amazon.com/iot/latest/developerguide/kinesis-rule-action.html below:

Kinesis Data Streams - AWS IoT Core

Kinesis Data Streams

The Kinesis Data Streams (kinesis) action writes data from an MQTT message to Amazon Kinesis Data Streams.

Requirements

This rule action has the following requirements:

Parameters

When you create an AWS IoT rule with this action, you must specify the following information:

stream

The Kinesis data stream to which to write data.

Supports substitution templates: API and AWS CLI only

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

Supports substitution templates: Yes

roleArn

The ARN of the IAM role that grants AWS IoT permission to access the Kinesis data stream. For more information, see Requirements.

Supports substitution templates: No

Examples

The following JSON example defines a Kinesis Data Streams action in an AWS IoT rule.

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

The following JSON example defines a Kinesis action with substitution templates in an AWS IoT rule.

{
    "topicRulePayload": {
        "sql": "SELECT * FROM 'some/topic'",
        "ruleDisabled": false,
        "awsIotSqlVersion": "2016-03-23",
        "actions": [
            {
                "kinesis": {
                    "streamName": "${topic()}",
                    "partitionKey": "${timestamp()}",
                    "roleArn": "arn:aws:iam::123456789012:role/aws_iot_kinesis"
                }
            }
        ]
    }
}
See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4