Rules for Amazon IoT - Amazon IoT Core
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Rules for Amazon IoT

Rules give your devices the ability to interact with Amazon services. Rules are analyzed and actions are performed based on the MQTT topic stream. You can use rules to support tasks like these:

  • Augment or filter data received from a device.

  • Write data received from a device to an Amazon DynamoDB database.

  • Save a file to Amazon S3.

  • Send a push notification to all users using Amazon SNS.

  • Publish data to an Amazon SQS queue.

  • Invoke a Lambda function to extract data.

  • Process messages from a large number of devices using Amazon Kinesis.

  • Send data to the Amazon Elasticsearch Service.

  • Capture a CloudWatch metric.

  • Change a CloudWatch alarm.

  • Send the data from an MQTT message to Amazon Machine Learning to make predictions based on an Amazon ML model.

  • Send a message to a Salesforce IoT Input Stream.

  • Send message data to an Amazon IoT Analytics channel.

  • Start execution of a Step Functions state machine.

  • Send message data to an Amazon IoT Events input.

  • Send message data an asset property in Amazon IoT SiteWise.

  • Send message data to a web application or service.

Your rules can use MQTT messages that pass through the publish/subscribe protocol supported by the Device communication protocols or, using the Basic Ingest feature, you can securely send device data to the Amazon services listed above without incurring messaging costs. (The Basic Ingest feature optimizes data flow by removing the publish/subscribe message broker from the ingestion path, so it is more cost effective while keeping the security and data processing features of Amazon IoT.)

Before Amazon IoT can perform these actions, you must grant it permission to access your Amazon resources on your behalf. When the actions are performed, you incur the standard charges for the Amazon services you use.

Troubleshooting a rule

If you have an issue with your rules, you should enable CloudWatch Logs. You can analyze your logs to determine whether the issue is authorization or whether, for example, a WHERE clause condition didn't match. For more information, see Setting Up CloudWatch Logs.