Apache Airflow version
3.1.1
What happened
The ECS Executor fails immediately on scheduler startup with:
AttributeError: 'TaskInstance' object has no attribute 'command_as_list'
This occurs in /airflow/providers/amazon/aws/executors/ecs/ecs_executor.py line 598 in the try_adopt_task_instances method when the scheduler attempts to adopt orphaned tasks.
What you think should happen instead
The ECS Executor should work with Airflow 3.x. The command_as_list() method was removed as part of the Task SDK refactoring in Airflow 3.0.
How to reproduce
- Install Airflow 3.1.1
- Install apache-airflow-providers-amazon==9.16.0
- Configure
AIRFLOW__CORE__EXECUTOR=airflow.providers.amazon.aws.executors.ecs.ecs_executor.AwsEcsExecutor
- Start the scheduler
- Scheduler crashes in boot loop with the above error
Operating System
Debian GNU/Linux 12 (in Docker/ECS)
Versions of Apache Airflow Providers
apache-airflow-providers-amazon==9.16.0
Deployment
Amazon (AWS) - ECS
Anything else
I found that PR #48513 (commit 8e8c84f) from April 2025 supposedly fixed this issue for Task SDK support, but this fix is NOT in the 9.16.0 release from October 2025.
I verified this by downloading the 9.16.0 package from PyPI and checking line 598:
pip download apache-airflow-providers-amazon==9.16.0 --no-deps
unzip apache_airflow_providers_amazon-9.16.0-py3-none-any.whl
grep -n "command_as_list" airflow/providers/amazon/aws/executors/ecs/ecs_executor.py
# Output: 598: ti.command_as_list(),
The current workaround is to install from main branch:
pip install git+https://github.com/apache/airflow.git@main#subdirectory=providers/amazon
This is blocking production deployments using ECS Executor with Airflow 3.x.
Are you willing to submit PR?
Code of Conduct
Apache Airflow version
3.1.1
What happened
The ECS Executor fails immediately on scheduler startup with:
This occurs in
/airflow/providers/amazon/aws/executors/ecs/ecs_executor.pyline 598 in thetry_adopt_task_instancesmethod when the scheduler attempts to adopt orphaned tasks.What you think should happen instead
The ECS Executor should work with Airflow 3.x. The
command_as_list()method was removed as part of the Task SDK refactoring in Airflow 3.0.How to reproduce
AIRFLOW__CORE__EXECUTOR=airflow.providers.amazon.aws.executors.ecs.ecs_executor.AwsEcsExecutorOperating System
Debian GNU/Linux 12 (in Docker/ECS)
Versions of Apache Airflow Providers
apache-airflow-providers-amazon==9.16.0
Deployment
Amazon (AWS) - ECS
Anything else
I found that PR #48513 (commit 8e8c84f) from April 2025 supposedly fixed this issue for Task SDK support, but this fix is NOT in the 9.16.0 release from October 2025.
I verified this by downloading the 9.16.0 package from PyPI and checking line 598:
The current workaround is to install from main branch:
This is blocking production deployments using ECS Executor with Airflow 3.x.
Are you willing to submit PR?
Code of Conduct