AWS Step Functions(SFN)State Machine
Collect AWS Step Functions (SFN) State Machine Metrics
Configuration¶
Permissions¶
For AWS cloud collection permissions, see AWS cloud integration role authorization. The read-only permissions required by this integration are listed below.
states:ListStateMachines: Get Step Functions state machine list.tag:GetResources: Read resource tags through the shared tag collection module to supplement asset tags.cloudwatch:ListMetrics: Discover CloudWatch monitoring metrics and dimensions.cloudwatch:GetMetricData: Read in batches: CloudWatch monitoring metric data.
Install Func¶
We recommend enabling hosted Func under Integration - Extensions in Guance. All prerequisites are installed automatically; continue with the script installation.
If deploying Func manually, refer to Manual Deployment of Func
Install Script¶
Prepare AWS AK in advance and authorize access as described in Permissions.
Activate Scripts in Hosted Func¶
- Log in to the Guance console
- Click the 【Integration】 menu and select 【Cloud Account Management】
- Click 【Add Cloud Account】, select 【AWS】, and fill in the required information on the interface. If you have already configured the cloud account information before, ignore this step
- Click 【Test】, and if the test is successful, click 【Save】. If the test fails, please check if the relevant configuration information is correct and test again
- Click 【Cloud Account Management】, and you can see the added cloud account in the list. Click the corresponding cloud account to enter the details page
- Click 【Integration】 on the cloud account details page, find
AWS Step Functions(SFN)State Machinein theNot Installedlist and click 【Install】 to open the installation form.
Manual Activation Script¶
-
Log in to the Func console, click 【Script Market】, open the Guance script market and search for
integration_aws_sfn_state_machine. -
Click 【Install】, then enter the corresponding parameters: AWS AK ID, AK Secret, and account name.
-
Click 【Deploy Startup Script】 to create the
Startupscript set and configure the corresponding startup scripts automatically. -
After enabling the script, open 【Management / Automatic Trigger Configuration】 to view its automatic trigger configuration. Click 【Execute】 to run it immediately without waiting for the scheduled time. After a short wait, review the task records and logs.
Verification¶
- Under 【Management / Automatic Trigger Configuration】, confirm that the task has an automatic trigger configuration. Review its task records and logs for errors.
- In Guance, check 【Infrastructure - Resource Catalog】 for asset information.
- In Guance, check 【Metrics】 for the corresponding monitoring data.
Metrics¶
Configure Amazon CloudWatch to collect more metrics Amazon CloudWatch Metrics Details
AWS Step Functions (SFN) State Machine metrics are under the aws_states Measurement, with the description column including the description, unit, and statistical data for each metric.
| Metric Name | Description |
|---|---|
ExecutionTime |
The time interval between the start and close of execution (in milliseconds) |
ExecutionThrottled |
The number of StateEntered events and retries that were throttled |
ExecutionsAborted |
The number of executions that were aborted or terminated |
ExecutionsFailed |
The number of executions that failed |
ExecutionsStarted |
The number of executions that started |
ExecutionsSucceeded |
The number of executions that completed successfully |
ExecutionsTimedOut |
The number of executions that timed out for any reason |
Object¶
The collected AWS Step Functions (SFN) State Machine object data structure can be viewed in "Infrastructure - Resource Catalog".
{
"measurement": "aws_sfn_state_machine",
"tags": {
"state_machine_arn" : "arn:xxx:axxxxow:ap-southeast-1:xxxx7738534:environment/MyAirflowEnvironment",
"sate_machine_name" : "HelloWorldStateMachine",
"RegionId" : "ap-southeast-1"
},
"fields": {
"type" : "STANDARD",
"creationDate" : "2025-08-15T10:35:10.879000+08:00"
}
}
Note: The fields in
tagsandfieldsmay change with subsequent updates