task_instances
Creates, updates, deletes, gets or lists a task_instances resource.
Overview
| Name | task_instances |
| Type | Resource |
| Id | aws.mwaa_serverless.task_instances |
Fields
The following fields are returned by SELECT queries:
- get_task_instance
- list_task_instances
| Name | Datatype | Description |
|---|---|---|
attempt_number | integer | The attempt number for this task instance. |
duration_in_seconds | integer | The duration of the task instance execution in seconds. This value is null if the task is not complete. |
ended_at | string (date-time) | The timestamp when the task instance completed execution, in ISO 8601 date-time format. This value is null if the task is not complete. |
error_message | string | The error message if the task instance failed. This value is null if the task completed successfully. (pattern: <code>.*</code>) |
log_stream | string | The CloudWatch log stream name for this task instance execution. (pattern: <code>[a-zA-Z0-9]+[a-zA-Z0-9.-_]*</code>) |
modified_at | string (date-time) | The timestamp when the task instance was last modified, in ISO 8601 date-time format. |
operator_name | string | The name of the Apache Airflow operator used for this task instance. (pattern: <code>.*</code>) |
run_id | string | The unique identifier of the workflow run that contains this task instance. (pattern: <code>[a-zA-Z0-9]+[a-zA-Z0-9.-_]*</code>) |
started_at | string (date-time) | The timestamp when the task instance started execution, in ISO 8601 date-time format. This value is null if the task has not started. |
status | string | The current status of the task instance. (QUEUED, FAILED, SCHEDULED, RUNNING, SUCCESS, UP_FOR_RESCHEDULE, UP_FOR_RETRY, UPSTREAM_FAILED, REMOVED, RESTARTING, DEFERRED, NONE, CANCELLED, TIMEOUT) |
task_id | string | The unique identifier of the task definition within the workflow. (pattern: <code>[a-zA-Z0-9]+[a-zA-Z0-9.-_]*</code>) |
task_instance_id | string | The unique identifier of this task instance. (pattern: <code>[a-zA-Z0-9]+[a-zA-Z0-9.-_]*</code>) |
workflow_arn | string | The Amazon Resource Name (ARN) of the workflow that contains this task instance. (pattern: <code>arn:aws(?:-(?:cn|us-gov|iso|iso-b|iso-e|iso-f))?:airflow-serverless:([a-z]{2}-[a-z]+-[0-9]{1}):([0-9]{12}):workflow/([a-zA-Z0-9][a-zA-Z0-9.-_]{0,254}-[a-zA-Z0-9]{10})</code>) |
workflow_version | string | The version of the workflow that contains this task instance. (pattern: <code>.+</code>) |
xcom | object | Cross-communication data exchanged between tasks in the workflow execution. |
| Name | Datatype | Description |
|---|---|---|
duration_in_seconds | integer | The duration of the task instance execution in seconds. This value is null if the task is not complete. |
operator_name | string | The name of the Apache Airflow operator used for this task instance. (pattern: <code>.*</code>) |
run_id | string | The unique identifier of the workflow run that contains this task instance. (pattern: <code>[a-zA-Z0-9]+[a-zA-Z0-9.-_]*</code>) |
status | string | The current status of the task instance. (QUEUED, FAILED, SCHEDULED, RUNNING, SUCCESS, UP_FOR_RESCHEDULE, UP_FOR_RETRY, UPSTREAM_FAILED, REMOVED, RESTARTING, DEFERRED, NONE, CANCELLED, TIMEOUT) |
task_instance_id | string | The unique identifier of this task instance. (pattern: <code>[a-zA-Z0-9]+[a-zA-Z0-9.-_]*</code>) |
workflow_arn | string | The Amazon Resource Name (ARN) of the workflow that contains this task instance. (pattern: <code>arn:aws(?:-(?:cn|us-gov|iso|iso-b|iso-e|iso-f))?:airflow-serverless:([a-z]{2}-[a-z]+-[0-9]{1}):([0-9]{12}):workflow/([a-zA-Z0-9][a-zA-Z0-9.-_]{0,254}-[a-zA-Z0-9]{10})</code>) |
workflow_version | string | The version of the workflow that contains this task instance. (pattern: <code>.+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_task_instance | select | region | Retrieves detailed information about a specific task instance within a workflow run. Task instances represent individual tasks that are executed as part of a workflow in the Amazon Managed Workflows for Apache Airflow Serverless environment. Each task instance runs in an isolated ECS container with dedicated resources and security boundaries. The service tracks task execution state, retry attempts, and provides detailed timing and error information for troubleshooting and monitoring purposes. | |
list_task_instances | select | region | Lists all task instances for a specific workflow run, with optional pagination support. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_task_instance
- list_task_instances
Retrieves detailed information about a specific task instance within a workflow run. Task instances represent individual tasks that are executed as part of a workflow in the Amazon Managed Workflows for Apache Airflow Serverless environment. Each task instance runs in an isolated ECS container with dedicated resources and security boundaries. The service tracks task execution state, retry attempts, and provides detailed timing and error information for troubleshooting and monitoring purposes.
SELECT
attempt_number,
duration_in_seconds,
ended_at,
error_message,
log_stream,
modified_at,
operator_name,
run_id,
started_at,
status,
task_id,
task_instance_id,
workflow_arn,
workflow_version,
xcom
FROM aws.mwaa_serverless.task_instances
WHERE region = '{{ region }}' -- required
;
Lists all task instances for a specific workflow run, with optional pagination support.
SELECT
duration_in_seconds,
operator_name,
run_id,
status,
task_instance_id,
workflow_arn,
workflow_version
FROM aws.mwaa_serverless.task_instances
WHERE region = '{{ region }}' -- required
;