Skip to content

AWS Step Function State Machine

Collect AWS Step Function State Machine Metrics

Configuration

Install Func

It is recommended to activate the TrueWatch integration - Extensions - DataFlux Func (Automata): All prerequisites are automatically installed, please proceed with the script installation.

If deploying Func manually, refer to Manual Deployment of Func

Install Script

Note: Please prepare the required Amazon AK in advance (for simplicity, you can directly grant the global read-only permission ReadOnlyAccess)

  1. Log in to the Func console, click [Script Market], enter the TrueWatch Script Market, and search for: integration_aws_sfn_state_machine

  2. Click [Install], then input the corresponding parameters: AWS AK ID, AK Secret, and account name.

  3. Click [Deploy Startup Script], the system will automatically create the Startup script set and configure the corresponding startup script.

  4. After enabling, you can see the corresponding automatic trigger configuration in "Manage / Automatic Trigger Configuration". Click [Execute] to immediately execute once without waiting for the scheduled time. Wait a moment, and you can view the execution task records and corresponding logs.

Verification

  1. In "Manage / Automatic Trigger Configuration", confirm whether the corresponding task has the automatic trigger configuration, and check the corresponding task records and logs for any exceptions.
  2. In TrueWatch, check if asset information exists in "Infrastructure - Resource Catalog".
  3. In TrueWatch, check if there are corresponding monitoring data in "Metrics".

Metrics

Configure Amazon CloudWatch to collect more metrics Amazon CloudWatch Metrics Details

AWS Step Function 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 Function 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 tags and fields may change with subsequent updates.