Step Functions - 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.

Step Functions

The Step Functions (stepFunctions) action starts an Amazon Step Functions state machine.

Requirements

This rule action has the following requirements:

  • An IAM role that Amazon IoT can assume to perform the states:StartExecution operation. For more information, see Granting Amazon IoT the required access.

    In the Amazon IoT console, you can choose or create a role to allow Amazon IoT to perform this rule action.

Parameters

When you create an Amazon IoT rule with this action, you must specify the following information:

stateMachineName

The name of the Step Functions state machine to start.

Supports substitution templates: API and Amazon CLI only

executionNamePrefix

(Optional) The name given to the state machine execution consists of this prefix followed by a UUID. Step Functions creates a unique name for each state machine execution if one is not provided.

Supports substitution templates: Yes

roleArn

The ARN of the role that grants Amazon IoT permission to start the state machine. For more information, see Requirements.

Supports substitution templates: No

Examples

The following JSON example defines a Step Functions action in an Amazon IoT rule.

{ "topicRulePayload": { "sql": "SELECT * FROM 'some/topic'", "ruleDisabled": false, "awsIotSqlVersion": "2016-03-23", "actions": [ { "stepFunctions": { "stateMachineName": "myStateMachine", "executionNamePrefix": "myExecution", "roleArn": "arn:aws:iam::123456789012:role/aws_iot_step_functions" } } ] } }

See also