fweilun commented on issue #52943:
URL: https://github.com/apache/airflow/issues/52943#issuecomment-3048397098
I used this operator with Airflow 3.1.0 to reproduce the error by adding
"command": ["run-script"] to the container definition, which triggered a
ResourceInitializationError.
The task is correctly marked as failed, but I’m not sure if the retry logic
was triggered. Is there any difference from our logs?
```python
from airflow import DAG
from datetime import datetime
from airflow.providers.amazon.aws.operators.ecs import EcsRunTaskOperator
with DAG(dag_id="test-ecs", start_date=datetime(2024, 1, 1)) as dag:
task = EcsRunTaskOperator(
task_id="test-ecs",
task_definition="testing:2",
cluster="xxx",
launch_type="FARGATE",
platform_version="LATEST",
network_configuration={
"awsvpcConfiguration": {
"subnets": ["subnet-id"],
"assignPublicIp": "ENABLED"
}
},
overrides={},
aws_conn_id="aws_conn",
region_name="us-east-2"
)
```
<img width="823" height="362" alt="Image"
src="https://github.com/user-attachments/assets/a5641691-a287-4e37-80ee-5a51629a2308"
/>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]