list_task_instances
Find Airflow tasks that ran during specific time windows using flexible date filters across all DAGs and runs in MWAA environments.
Instructions
List task instances across DAGs with flexible time-based filtering.
This is the key tool for finding what tasks were running during a specific time window. Supports wildcards: omit dag_id or dag_run_id to query across all DAGs/runs.
Args: environment_name: Name of the MWAA environment dag_id: Filter by DAG ID (optional - omit for all DAGs) dag_run_id: Filter by DAG run ID (optional - omit for all runs) start_date_gte: Tasks that started at or after this time (ISO format) start_date_lte: Tasks that started at or before this time (ISO format) end_date_gte: Tasks that ended at or after this time (ISO format) end_date_lte: Tasks that ended at or before this time (ISO format) execution_date_gte: Filter by execution/logical date >= (ISO format) execution_date_lte: Filter by execution/logical date <= (ISO format) state: Filter by state (queued, running, success, failed, etc.) pool: Filter by pool name queue: Filter by queue name duration_gte: Filter by minimum duration in seconds duration_lte: Filter by maximum duration in seconds limit: Number of items to return (default 100) offset: Number of items to skip for pagination
Returns: Dictionary containing list of task instances with details
Example - Find tasks running between 2:30-2:40 AM: list_task_instances( environment_name="my-env", start_date_lte="2024-01-15T02:40:00Z", # Started before 2:40 end_date_gte="2024-01-15T02:30:00Z", # Ended after 2:30 (or still running) )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| environment_name | Yes | ||
| dag_id | No | ||
| dag_run_id | No | ||
| start_date_gte | No | ||
| start_date_lte | No | ||
| end_date_gte | No | ||
| end_date_lte | No | ||
| execution_date_gte | No | ||
| execution_date_lte | No | ||
| state | No | ||
| pool | No | ||
| queue | No | ||
| duration_gte | No | ||
| duration_lte | No | ||
| limit | No | ||
| offset | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||