get-task-logs
Retrieve Amazon MWAA task instance try logs to debug failed runs. Supports pagination via continuation tokens for large log files.
Instructions
Get logs for a specific task instance try.
Returns the execution logs for a task instance at a specific try number.
Useful for debugging failed or problematic task executions.
Supports pagination for large logs via the full_content and token parameters.
If the request times out (common with large logs >80MB), automatically retries
with chunked mode (full_content=false) and returns the first chunk with a
continuation token for fetching subsequent chunks.
Args:
ctx: The MCP context.
environment_name: Name of the MWAA environment.
dag_id: The DAG identifier.
dag_run_id: The DAG run identifier.
task_id: The task identifier.
try_number: The try number (starts at 1).
full_content: Whether to return full content or paginated chunks.
token: Continuation token for fetching subsequent log chunks.
map_index: Map index for mapped task instances.
region: AWS region override.
profile_name: AWS CLI profile name override.
Returns:
CallToolResult with the task logs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | No | Continuation token from a previous response to fetch the next chunk of logs. | |
| dag_id | Yes | The DAG ID. | |
| region | No | AWS region override. | |
| task_id | Yes | The task ID. | |
| map_index | No | For mapped task instances, the map index to get logs for. | |
| dag_run_id | Yes | The DAG run ID. | |
| try_number | Yes | The task try number (starts at 1). | |
| full_content | No | Whether to return full log content. When False, returns chunked logs with a continuation_token for pagination. Defaults to None (server default). Set to False explicitly for large logs. | |
| profile_name | No | AWS CLI profile name override. | |
| environment_name | No | Name of the MWAA environment. If omitted and only one environment exists, it is used automatically. |