AWS IoT Topic Rule

This page shows how to write Terraform and CloudFormation for AWS IoT Topic Rule and write them securely.

aws_iot_topic_rule (Terraform)

The Topic Rule in AWS IoT can be configured in Terraform with the resource name aws_iot_topic_rule. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub
resource "aws_iot_topic_rule" "temp_analytics" {
  name        = "temp_analytics"
  description = "Send temperature readings to DynamoDB"
  enabled     = true
  sql         = "SELECT *, timestamp() as timestamp FROM 'tempReading/bedroom'"
  sql_version = "2016-03-23"

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).


Explanation in Terraform Registry

AWS::IoT::TopicRule (CloudFormation)

The TopicRule in IoT can be configured in CloudFormation with the resource name AWS::IoT::TopicRule. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.


Explanation in CloudFormation Registry

Use the AWS::IoT::TopicRule resource to declare an AWS IoT rule. For information about working with AWS IoT rules, see Rules for AWS IoT in the AWS IoT Developer Guide.

Frequently asked questions

What is AWS IoT Topic Rule?

AWS IoT Topic Rule is a resource for IoT of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS IoT Topic Rule?

For Terraform, the danielsiwiec/esp8266-mqtt-aws-iot-temperature source code example is useful. See the Terraform Example section for further details.