Menu
AWS IoT
Developer Guide

SQS Action

A sqs action sends data from the MQTT message that triggered the rule to an SQS queue. When creating a rule with an sqs action, you must specify the following information:

queueUrl

The URL of the SQS queue to which to write the data.

useBase64

Set to true if you want the MQTT message data to be Base64-encoded before writing to the SQS queue. Otherwise, set to false.

roleArn

The IAM role that allows access to the SQS queue.

Note

Make sure the role associated with the rule has a policy granting the sqs:SendMessage permission.

The following JSON example shows how to create an AWS IoT rule with an sqs action:

{ "rule": { "sql": "SELECT * FROM 'some/topic'", "ruleDisabled": false, "actions": [{ "sqs": { "queueUrl": "https://sqs.us-east-2.amazonaws.com/123456789012/my_sqs_queue", "roleArn": "arn:aws:iam::123456789012:role/aws_iot_sqs", "useBase64": false } }] } }

For more information, see the Amazon SQS Developer Guide.