AWS Step Functions icon

AWS Step Functions

Consume the AWS Step Functions API

Overview

This node integrates with AWS Step Functions, allowing users to control and interact with state machine executions programmatically within n8n workflows. Specifically, the "Stop Execution" operation enables stopping a running execution of a state machine by specifying its Amazon Resource Name (ARN). This is useful in scenarios where an execution needs to be halted due to errors, changed conditions, or manual intervention.

Practical examples include:

  • Automatically stopping a workflow execution if certain error conditions are detected downstream.
  • Providing manual control in automation pipelines to halt long-running or stuck executions.
  • Integrating with monitoring systems that trigger stop commands based on alerts.

Properties

Name Meaning
Execution ARN The Amazon Resource Name (ARN) of the execution to stop. This uniquely identifies the execution.
Error (Optional) An error code representing the reason for stopping the execution.
Cause (Optional) A detailed explanation describing the cause of the failure or stop request.

Output

The output JSON contains the response from the AWS Step Functions API after attempting to stop the execution. Typically, this includes metadata about the stopped execution such as its status and timestamps. No binary data is produced by this node.

Example output structure (simplified):

{
  "stopDate": "2024-01-01T12:00:00Z",
  "status": "STOPPED"
}

Dependencies

  • Requires valid AWS credentials with permissions to interact with AWS Step Functions.
  • The node uses the AWS SDK internally; no additional user setup beyond providing credentials is needed.
  • AWS region must be specified in the credentials configuration.

Troubleshooting

  • Common issues:

    • Invalid or missing Execution ARN will cause the operation to fail.
    • Insufficient AWS permissions can result in authorization errors.
    • Attempting to stop an execution that is already completed or stopped may return an error or no effect.
  • Error messages:

    • "Execution does not exist" — Verify the ARN is correct and the execution is active.
    • "Access Denied" — Check that the provided AWS credentials have the necessary permissions.
    • Timeouts or network errors — Ensure network connectivity to AWS services.

To resolve these, confirm the ARN correctness, validate AWS IAM policies, and check network settings.

Links and References

Discussion