Skip to content

aws.stepfunctions.get_execution_history

Example SQL Queries

SELECT * FROM
aws.stepfunctions.get_execution_history
WHERE
"execution_arn" = 'VALUE';

Description

Returns the history of the specified execution as a list of events. By default, the results are returned in ascending order of the timeStamp of the events. Use the reverseOrder parameter to get the latest events first.

If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

This API action is not supported by EXPRESS state machines.

Table Definition

Column NameColumn Data Type
execution_arn Required Input Column

The Amazon Resource Name (ARN) of the execution.

VARCHAR
include_execution_data Input Column

You can select whether execution data (input or output of a history event) is returned. The default is true.

BOOLEAN
reverse_order Input Column

Lists events in descending order of their timeStamp.

BOOLEAN
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

activity_failed_event_details

Contains details about an activity that failed during an execution.

STRUCT(
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
activity_failed_event_details.cause

A more detailed explanation of the cause of the failure.

activity_failed_event_details.error

The error code of the failure.

activity_schedule_failed_event_details

Contains details about an activity schedule event that failed during an execution.

STRUCT(
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
activity_schedule_failed_event_details.cause

A more detailed explanation of the cause of the failure.

activity_schedule_failed_event_details.error

The error code of the failure.

activity_scheduled_event_details

Contains details about an activity scheduled during an execution.

STRUCT(
"resource" VARCHAR,
"input" VARCHAR,
"input_details" STRUCT(
"truncated" BOOLEAN
),
"timeout_in_seconds" BIGINT,
"heartbeat_in_seconds" BIGINT
)
Show child fields
activity_scheduled_event_details.heartbeat_in_seconds

The maximum allowed duration between two heartbeats for the activity task.

activity_scheduled_event_details.input

The JSON data input to the activity task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

activity_scheduled_event_details.input_details

Contains details about the input for an execution history event.

Show child fields
activity_scheduled_event_details.input_details.truncated

Indicates whether input or output was truncated in the response. Always false for API calls.

activity_scheduled_event_details.resource

The Amazon Resource Name (ARN) of the scheduled activity.

activity_scheduled_event_details.timeout_in_seconds

The maximum allowed duration of the activity task.

activity_started_event_details

Contains details about the start of an activity during an execution.

STRUCT(
"worker_name" VARCHAR
)
Show child fields
activity_started_event_details.worker_name

The name of the worker that the task is assigned to. These names are provided by the workers when calling GetActivityTask.

activity_succeeded_event_details

Contains details about an activity that successfully terminated during an execution.

STRUCT(
"output" VARCHAR,
"output_details" STRUCT(
"truncated" BOOLEAN
)
)
Show child fields
activity_succeeded_event_details.output

The JSON data output by the activity task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

activity_succeeded_event_details.output_details

Contains details about the output of an execution history event.

Show child fields
activity_succeeded_event_details.output_details.truncated

Indicates whether input or output was truncated in the response. Always false for API calls.

activity_timed_out_event_details

Contains details about an activity timeout that occurred during an execution.

STRUCT(
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
activity_timed_out_event_details.cause

A more detailed explanation of the cause of the timeout.

activity_timed_out_event_details.error

The error code of the failure.

execution_aborted_event_details

Contains details about an abort of an execution.

STRUCT(
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
execution_aborted_event_details.cause

A more detailed explanation of the cause of the failure.

execution_aborted_event_details.error

The error code of the failure.

execution_failed_event_details

Contains details about an execution failure event.

STRUCT(
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
execution_failed_event_details.cause

A more detailed explanation of the cause of the failure.

execution_failed_event_details.error

The error code of the failure.

execution_redriven_event_details

Contains details about the redrive attempt of an execution.

STRUCT(
"redrive_count" BIGINT
)
Show child fields
execution_redriven_event_details.redrive_count

The number of times you've redriven an execution. If you have not yet redriven an execution, the redriveCount is 0. This count is not updated for redrives that failed to start or are pending to be redriven.

execution_started_event_details

Contains details about the start of the execution.

STRUCT(
"input" VARCHAR,
"input_details" STRUCT(
"truncated" BOOLEAN
),
"role_arn" VARCHAR,
"state_machine_alias_arn" VARCHAR,
"state_machine_version_arn" VARCHAR
)
Show child fields
execution_started_event_details.input

The JSON data input to the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

execution_started_event_details.input_details

Contains details about the input for an execution history event.

Show child fields
execution_started_event_details.input_details.truncated

Indicates whether input or output was truncated in the response. Always false for API calls.

execution_started_event_details.role_arn

The Amazon Resource Name (ARN) of the IAM role used for executing Lambda tasks.

execution_started_event_details.state_machine_alias_arn

The Amazon Resource Name (ARN) that identifies a state machine alias used for starting the state machine execution.

execution_started_event_details.state_machine_version_arn

The Amazon Resource Name (ARN) that identifies a state machine version used for starting the state machine execution.

execution_succeeded_event_details

Contains details about the successful termination of the execution.

STRUCT(
"output" VARCHAR,
"output_details" STRUCT(
"truncated" BOOLEAN
)
)
Show child fields
execution_succeeded_event_details.output

The JSON data output by the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

execution_succeeded_event_details.output_details

Contains details about the output of an execution history event.

Show child fields
execution_succeeded_event_details.output_details.truncated

Indicates whether input or output was truncated in the response. Always false for API calls.

execution_timed_out_event_details

Contains details about the execution timeout that occurred during the execution.

STRUCT(
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
execution_timed_out_event_details.cause

A more detailed explanation of the cause of the timeout.

execution_timed_out_event_details.error

The error code of the failure.

id

The id of the event. Events are numbered sequentially, starting at one.

BIGINT
lambda_function_failed_event_details

Contains details about a Lambda function that failed during an execution.

STRUCT(
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
lambda_function_failed_event_details.cause

A more detailed explanation of the cause of the failure.

lambda_function_failed_event_details.error

The error code of the failure.

lambda_function_schedule_failed_event_details

Contains details about a failed Lambda function schedule event that occurred during an execution.

STRUCT(
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
lambda_function_schedule_failed_event_details.cause

A more detailed explanation of the cause of the failure.

lambda_function_schedule_failed_event_details.error

The error code of the failure.

lambda_function_scheduled_event_details

Contains details about a Lambda function scheduled during an execution.

STRUCT(
"resource" VARCHAR,
"input" VARCHAR,
"input_details" STRUCT(
"truncated" BOOLEAN
),
"timeout_in_seconds" BIGINT,
"task_credentials" STRUCT(
"role_arn" VARCHAR
)
)
Show child fields
lambda_function_scheduled_event_details.input

The JSON data input to the Lambda function. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

lambda_function_scheduled_event_details.input_details

Contains details about input for an execution history event.

Show child fields
lambda_function_scheduled_event_details.input_details.truncated

Indicates whether input or output was truncated in the response. Always false for API calls.

lambda_function_scheduled_event_details.resource

The Amazon Resource Name (ARN) of the scheduled Lambda function.

lambda_function_scheduled_event_details.task_credentials

The credentials that Step Functions uses for the task.

Show child fields
lambda_function_scheduled_event_details.task_credentials.role_arn

The ARN of an IAM role that Step Functions assumes for the task. The role can allow cross-account access to resources.

lambda_function_scheduled_event_details.timeout_in_seconds

The maximum allowed duration of the Lambda function.

lambda_function_start_failed_event_details

Contains details about a lambda function that failed to start during an execution.

STRUCT(
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
lambda_function_start_failed_event_details.cause

A more detailed explanation of the cause of the failure.

lambda_function_start_failed_event_details.error

The error code of the failure.

lambda_function_succeeded_event_details

Contains details about a Lambda function that terminated successfully during an execution.

STRUCT(
"output" VARCHAR,
"output_details" STRUCT(
"truncated" BOOLEAN
)
)
Show child fields
lambda_function_succeeded_event_details.output

The JSON data output by the Lambda function. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

lambda_function_succeeded_event_details.output_details

Contains details about the output of an execution history event.

Show child fields
lambda_function_succeeded_event_details.output_details.truncated

Indicates whether input or output was truncated in the response. Always false for API calls.

lambda_function_timed_out_event_details

Contains details about a Lambda function timeout that occurred during an execution.

STRUCT(
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
lambda_function_timed_out_event_details.cause

A more detailed explanation of the cause of the timeout.

lambda_function_timed_out_event_details.error

The error code of the failure.

map_iteration_aborted_event_details

Contains details about an iteration of a Map state that was aborted.

STRUCT(
"name" VARCHAR,
"index" BIGINT
)
Show child fields
map_iteration_aborted_event_details.index

The index of the array belonging to the Map state iteration.

map_iteration_aborted_event_details.name

The name of the iteration’s parent Map state.

map_iteration_failed_event_details

Contains details about an iteration of a Map state that failed.

STRUCT(
"name" VARCHAR,
"index" BIGINT
)
Show child fields
map_iteration_failed_event_details.index

The index of the array belonging to the Map state iteration.

map_iteration_failed_event_details.name

The name of the iteration’s parent Map state.

map_iteration_started_event_details

Contains details about an iteration of a Map state that was started.

STRUCT(
"name" VARCHAR,
"index" BIGINT
)
Show child fields
map_iteration_started_event_details.index

The index of the array belonging to the Map state iteration.

map_iteration_started_event_details.name

The name of the iteration’s parent Map state.

map_iteration_succeeded_event_details

Contains details about an iteration of a Map state that succeeded.

STRUCT(
"name" VARCHAR,
"index" BIGINT
)
Show child fields
map_iteration_succeeded_event_details.index

The index of the array belonging to the Map state iteration.

map_iteration_succeeded_event_details.name

The name of the iteration’s parent Map state.

map_run_failed_event_details

Contains error and cause details about a Map Run that failed.

STRUCT(
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
map_run_failed_event_details.cause

A more detailed explanation of the cause of the failure.

map_run_failed_event_details.error

The error code of the Map Run failure.

map_run_redriven_event_details

Contains details about the redrive attempt of a Map Run.

STRUCT(
"map_run_arn" VARCHAR,
"redrive_count" BIGINT
)
Show child fields
map_run_redriven_event_details.map_run_arn

The Amazon Resource Name (ARN) of a Map Run that was redriven.

map_run_redriven_event_details.redrive_count

The number of times the Map Run has been redriven at this point in the execution's history including this event. The redrive count for a redriven Map Run is always greater than 0.

map_run_started_event_details

Contains details, such as mapRunArn, and the start date and time of a Map Run. mapRunArn is the Amazon Resource Name (ARN) of the Map Run that was started.

STRUCT(
"map_run_arn" VARCHAR
)
Show child fields
map_run_started_event_details.map_run_arn

The Amazon Resource Name (ARN) of a Map Run that was started.

map_state_started_event_details

Contains details about Map state that was started.

STRUCT(
"length" BIGINT
)
Show child fields
map_state_started_event_details.length

The size of the array for Map state iterations.

previous_event_id

The id of the previous event.

BIGINT
state_entered_event_details

Contains details about a state entered during an execution.

STRUCT(
"name" VARCHAR,
"input" VARCHAR,
"input_details" STRUCT(
"truncated" BOOLEAN
)
)
Show child fields
state_entered_event_details.input

The string that contains the JSON input data for the state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

state_entered_event_details.input_details

Contains details about the input for an execution history event.

Show child fields
state_entered_event_details.input_details.truncated

Indicates whether input or output was truncated in the response. Always false for API calls.

state_entered_event_details.name

The name of the state.

state_exited_event_details

Contains details about an exit from a state during an execution.

STRUCT(
"name" VARCHAR,
"output" VARCHAR,
"output_details" STRUCT(
"truncated" BOOLEAN
)
)
Show child fields
state_exited_event_details.name

The name of the state.

A name must not contain:

  • white space

  • brackets < > { } [ ]

  • wildcard characters ? *

  • special characters " # % \ ^ | ~ ` $ & , ; : /

  • control characters (U+0000-001F, U+007F-009F)

To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.

state_exited_event_details.output

The JSON output data of the state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

state_exited_event_details.output_details

Contains details about the output of an execution history event.

Show child fields
state_exited_event_details.output_details.truncated

Indicates whether input or output was truncated in the response. Always false for API calls.

task_failed_event_details

Contains details about the failure of a task.

STRUCT(
"resource_type" VARCHAR,
"resource" VARCHAR,
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
task_failed_event_details.cause

A more detailed explanation of the cause of the failure.

task_failed_event_details.error

The error code of the failure.

task_failed_event_details.resource

The action of the resource called by a task state.

task_failed_event_details.resource_type

The service name of the resource in a task state.

task_scheduled_event_details

Contains details about a task that was scheduled.

STRUCT(
"resource_type" VARCHAR,
"resource" VARCHAR,
"region" VARCHAR,
"parameters" VARCHAR,
"timeout_in_seconds" BIGINT,
"heartbeat_in_seconds" BIGINT,
"task_credentials" STRUCT(
"role_arn" VARCHAR
)
)
Show child fields
task_scheduled_event_details.heartbeat_in_seconds

The maximum allowed duration between two heartbeats for the task.

task_scheduled_event_details.parameters

The JSON data passed to the resource referenced in a task state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

task_scheduled_event_details.region

The region of the scheduled task

task_scheduled_event_details.resource

The action of the resource called by a task state.

task_scheduled_event_details.resource_type

The service name of the resource in a task state.

task_scheduled_event_details.task_credentials

The credentials that Step Functions uses for the task.

Show child fields
task_scheduled_event_details.task_credentials.role_arn

The ARN of an IAM role that Step Functions assumes for the task. The role can allow cross-account access to resources.

task_scheduled_event_details.timeout_in_seconds

The maximum allowed duration of the task.

task_start_failed_event_details

Contains details about a task that failed to start.

STRUCT(
"resource_type" VARCHAR,
"resource" VARCHAR,
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
task_start_failed_event_details.cause

A more detailed explanation of the cause of the failure.

task_start_failed_event_details.error

The error code of the failure.

task_start_failed_event_details.resource

The action of the resource called by a task state.

task_start_failed_event_details.resource_type

The service name of the resource in a task state.

task_started_event_details

Contains details about a task that was started.

STRUCT(
"resource_type" VARCHAR,
"resource" VARCHAR
)
Show child fields
task_started_event_details.resource

The action of the resource called by a task state.

task_started_event_details.resource_type

The service name of the resource in a task state.

task_submit_failed_event_details

Contains details about a task that where the submit failed.

STRUCT(
"resource_type" VARCHAR,
"resource" VARCHAR,
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
task_submit_failed_event_details.cause

A more detailed explanation of the cause of the failure.

task_submit_failed_event_details.error

The error code of the failure.

task_submit_failed_event_details.resource

The action of the resource called by a task state.

task_submit_failed_event_details.resource_type

The service name of the resource in a task state.

task_submitted_event_details

Contains details about a submitted task.

STRUCT(
"resource_type" VARCHAR,
"resource" VARCHAR,
"output" VARCHAR,
"output_details" STRUCT(
"truncated" BOOLEAN
)
)
Show child fields
task_submitted_event_details.output

The response from a resource when a task has started. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

task_submitted_event_details.output_details

Contains details about the output of an execution history event.

Show child fields
task_submitted_event_details.output_details.truncated

Indicates whether input or output was truncated in the response. Always false for API calls.

task_submitted_event_details.resource

The action of the resource called by a task state.

task_submitted_event_details.resource_type

The service name of the resource in a task state.

task_succeeded_event_details

Contains details about a task that succeeded.

STRUCT(
"resource_type" VARCHAR,
"resource" VARCHAR,
"output" VARCHAR,
"output_details" STRUCT(
"truncated" BOOLEAN
)
)
Show child fields
task_succeeded_event_details.output

The full JSON response from a resource when a task has succeeded. This response becomes the output of the related task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

task_succeeded_event_details.output_details

Contains details about the output of an execution history event.

Show child fields
task_succeeded_event_details.output_details.truncated

Indicates whether input or output was truncated in the response. Always false for API calls.

task_succeeded_event_details.resource

The action of the resource called by a task state.

task_succeeded_event_details.resource_type

The service name of the resource in a task state.

task_timed_out_event_details

Contains details about a task that timed out.

STRUCT(
"resource_type" VARCHAR,
"resource" VARCHAR,
"error" VARCHAR,
"cause" VARCHAR
)
Show child fields
task_timed_out_event_details.cause

A more detailed explanation of the cause of the failure.

task_timed_out_event_details.error

The error code of the failure.

task_timed_out_event_details.resource

The action of the resource called by a task state.

task_timed_out_event_details.resource_type

The service name of the resource in a task state.

timestamp

The date and time the event occurred.

TIMESTAMP_S
type

The type of the event.

VARCHAR