AWS Step Functions
Developer Guide

Call Amazon SQS with Step Functions

Step Functions can control some AWS services directly from the Amazon States Language. For more information, see:

Supported APIs:


There is a limit on the maximum input or result data size for a task in Step Functions. This limits you to 32,768 characters of data when you send to, or receive data from, another service. See Limits Related to State Machine Executions.

The following includes a Task state that sends an Amazon SQS message.

{ "StartAt": "Send to SQS", "States": { "Send to SQS": { "Type": "Task", "Resource": "arn:aws:states:::sqs:sendMessage", "Parameters": { "QueueUrl": "", "MessageBody.$": "$.input.message", "MessageAttributes": { "my attribute no 1": { "DataType": "String", "StringValue": "value of my attribute no 1" }, "my attribute no 2": { "DataType": "String", "StringValue": "value of my attribute no 2" } } }, "End": true } } }

To learn more about receiving messages in Amazon SQS, see Receive and Delete Your Message in the Amazon Simple Queue Service Developer Guide.

For information on how to configure IAM when using Step Functions with other AWS services, see IAM Policies for Integrated Services.