AWS Step Functions icon

AWS Step Functions

Consume the AWS Step Functions API

Overview

This node integrates with AWS Step Functions, allowing users to interact with state machines and their executions programmatically within n8n workflows. Specifically, the "Describe State Machine for Execution" operation retrieves detailed information about the state machine associated with a particular execution ARN (Amazon Resource Name). This is useful when you want to understand or audit the configuration and metadata of the state machine that ran a specific execution.

Practical scenarios include:

  • Auditing or logging workflows by fetching state machine details linked to an execution.
  • Dynamically branching workflow logic based on state machine properties.
  • Troubleshooting or monitoring AWS Step Functions executions by correlating execution data with state machine definitions.

Properties

Name Meaning
Execution ARN The Amazon Resource Name (ARN) of the execution whose associated state machine you want to describe. This uniquely identifies the execution in AWS Step Functions.

Output

The output is a JSON object containing the response from the AWS Step Functions API's describeStateMachineForExecution call. It typically includes details such as:

  • The ARN of the state machine.
  • The name and status of the state machine.
  • The definition and role ARN associated with the state machine.
  • Metadata like creation date and update date.

This output provides comprehensive information about the state machine linked to the specified execution ARN.

The node does not output binary data.

Dependencies

  • Requires valid AWS credentials with permissions to access AWS Step Functions.
  • The node uses the AWS SDK internally to communicate with AWS services.
  • AWS credentials must be configured in n8n (e.g., via an API key credential with appropriate access rights).
  • Network connectivity to AWS endpoints is necessary.

Troubleshooting

  • Invalid ARN: If the provided execution ARN is incorrect or does not exist, the node will throw an error indicating the resource was not found. Verify the ARN format and existence.
  • Insufficient Permissions: Errors related to authorization usually mean the AWS credentials lack permissions to call DescribeStateMachineForExecution. Ensure the IAM role or user has the required policies attached.
  • Network Issues: Timeouts or connection errors may occur if n8n cannot reach AWS endpoints. Check network/firewall settings.
  • Malformed Input: Providing empty or malformed ARNs will cause validation errors. Always provide a valid, non-empty string.

If the node is set to continue on failure, it will append error details to the output instead of stopping execution.

Links and References

Discussion