Table: aws_sfn_state_machine - Query AWS Step Functions State Machines using SQL
The AWS Step Functions State Machine is a component of AWS Step Functions service that represents the workflow of a distributed application. It defines a series of steps, their inputs, outputs, and how they interact. With this, you can coordinate microservices, automate processes, and build workflows to orchestrate AWS services and respond to changes.
Table Usage Guide
The aws_sfn_state_machine
table in Steampipe provides you with information about State Machines within AWS Step Functions. This table allows you, as a DevOps engineer, to query state machine-specific details, including ARN, name, type, status, creation date, and associated metadata. You can utilize this table to gather insights on state machines, such as their current status, type, role ARN, and more. The schema outlines the various attributes of the state machine for you, including the state machine ARN, creation date, definition, role ARN, and status.
Examples
Basic info
Explore which AWS Step Functions state machines are currently active, by identifying their name, status, and associated role. This can be useful in managing your AWS resources and tracking the status of your workflows.
select name, arn, status, type, role_arnfrom aws_sfn_state_machine;
select name, arn, status, type, role_arnfrom aws_sfn_state_machine;
List active state machines
Discover the active state machines in your AWS Step Functions to manage and maintain your workflow executions effectively. This can help you focus on workflows that are currently operational, ensuring resources are allocated efficiently.
select name, arn, statusfrom aws_sfn_state_machinewhere status = 'ACTIVE';
select name, arn, statusfrom aws_sfn_state_machinewhere status = 'ACTIVE';
Schema for aws_sfn_state_machine
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. | |
arn | text | = | The Amazon Resource Name (ARN) that identifies the state machine. |
creation_date | timestamp with time zone | The date the state machine is created. | |
definition | text | The Amazon States Language definition of the state machine. | |
description | text | The description of the state machine version. | |
label | text | A user-defined or an auto-generated string that identifies a Map state. | |
logging_configuration | jsonb | The LoggingConfiguration data type is used to set CloudWatch Logs options. | |
name | text | The name of the state machine. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
region | text | The AWS Region in which the resource is located. | |
revision_id | text | The revision identifier for the state machine. | |
role_arn | text | The Amazon Resource Name (ARN) of the IAM role used when creating this state machine. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | The current status of the state machine. | |
tags | jsonb | A map of tags for the resource. | |
tags_src | jsonb | The list of tags associated with the state machine. | |
title | text | Title of the resource. | |
tracing_configuration | jsonb | Selects whether AWS X-Ray tracing is enabled. | |
type | text | The type of the state machine. |
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