Menu
AWS IoT
Developer Guide

Amazon ES Action

The elasticsearch action allows you to write data from MQTT messages to an Amazon Elasticsearch Service domain. Data in Amazon ES can then be queried and visualized by using tools like Kibana. When you create an AWS IoT rule with an elasticsearch action, you must specify the following information:

endpoint

The endpoint of your Amazon ES domain.

index

The Amazon ES index where you want to store your data.

type

The type of document you are storing.

id

The unique identifier for each document.

Note

Ensure the role associated with the rule has a policy granting the es:ESHttpPut permission.

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

{ "rule":{ "sql":"SELECT *, timestamp() as timestamp FROM 'iot/test'", "ruleDisabled":false, "actions":[ { "elasticsearch":{ "roleArn":"arn:aws:iam::123456789012:role/aws_iot_es", "endpoint":"https://my-endpoint", "index":"my-index", "type":"my-type", "id":"${newuuid()}" } } ] } }

For more information, see the Amazon ES Developer Guide.