Table: aws_sfn_state_machine_execution - Query AWS Step Functions State Machine Execution using SQL
The AWS Step Functions State Machine Execution is a feature of AWS Step Functions that allows you to coordinate multiple AWS services into serverless workflows so you can build and update apps quickly. Using Step Functions, you can design and run workflows that stitch together services, such as AWS Lambda, AWS Fargate, and Amazon SageMaker, into feature-rich applications. Workflows are made up of a series of steps, with the output of one step acting as input into the next.
Table Usage Guide
The aws_sfn_state_machine_execution
table in Steampipe provides you with information about the execution of state machines within AWS Step Functions. This table allows you, as a DevOps engineer, to query execution-specific details, including execution status, start and end times, and associated state machine details. You can utilize this table to gather insights on state machine executions, such as execution duration, status, and associated state machine ARN. The schema outlines for you the various attributes of the state machine execution, including the state machine ARN, execution ARN, status, start time, end time, and more.
Examples
Basic info
Gain insights into the status of your AWS Step Functions state machine executions to understand their current operational state and monitor their progress. This can help in identifying any potential issues or bottlenecks in your workflows.
select name, execution_arn, status, state_machine_arnfrom aws_sfn_state_machine_execution;
select name, execution_arn, status, state_machine_arnfrom aws_sfn_state_machine_execution;
List failed executions
Determine the areas in which AWS Step Functions executions have failed, allowing you to identify problematic workflows and troubleshoot accordingly.
select name, execution_arn, status, state_machine_arnfrom aws_sfn_state_machine_executionwhere status = 'FAILED';
select name, execution_arn, status, state_machine_arnfrom aws_sfn_state_machine_executionwhere status = 'FAILED';
Schema for aws_sfn_state_machine_execution
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
cause | text | The cause string if the state machine execution failed. | |
error | text | The error string if the state machine execution failed. | |
execution_arn | text | = | The Amazon Resource Name (ARN) that identifies the execution. |
input | text | The string that contains the JSON input data of the execution. | |
input_details | jsonb | Provides details about execution input or output. | |
map_run_arn | text | The Amazon Resource Name (ARN) that identifies a Map Run, which dispatched this execution. | |
name | text | The name of the execution. | |
output | text | The JSON output data of the execution. | |
output_details | jsonb | Provides details about execution input or output. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
redrive_count | bigint | The number of times you've redriven an execution. If you have not yet redriven an execution, the redriveCount is 0. | |
redrive_date | timestamp with time zone | The date the execution was last redriven. | |
redrive_status | text | Indicates whether or not an execution can be redriven at a given point in time. | |
redrive_status_reason | text | When redriveStatus is NOT_REDRIVABLE , redriveStatusReason specifies the reason why an execution cannot be redriven. | |
region | text | The AWS Region in which the resource is located. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
start_date | timestamp with time zone | The date the execution started. | |
state_machine_alias_arn | text | The Amazon Resource Name (ARN) of the state machine alias associated with the execution. | |
state_machine_arn | text | = | The Amazon Resource Name (ARN) of the executed state machine. |
state_machine_version_arn | text | The Amazon Resource Name (ARN) of the state machine version associated with the execution. | |
status | text | = | The current status of the execution. |
stop_date | timestamp with time zone | If the execution already ended, the date the execution stopped. | |
title | text | Title of the resource. | |
trace_header | text | The AWS X-Ray trace header that was passed to the execution. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws
You can pass the configuration to the command with the --config
argument:
steampipe_export_aws --config '<your_config>' aws_sfn_state_machine_execution