https://prefect.io logo
#prefect-aws
Title
# prefect-aws
v

Vishnu Duggirala

12/02/2022, 8:46 PM
Could anyone please explain why Prefect is attempting to register task definitions?
18:51:43.512 | INFO    | prefect.infrastructure.ecs-task - ECSTask 'tasteful-ringtail': Registering task definition...
Is it possible to avoid this?
1
a

Alex Turek

12/02/2022, 8:48 PM
AFAIK the behavior is, when you run ECSTask without specifying an existing task definition ARN 1. require task definition. register that in ECS 2. run task 3. dergister task def
v

Vishnu Duggirala

12/02/2022, 8:57 PM
Hey Alex thanks for your quick reply, I have provided the task_arn but it is still registering.
z

Zanie

12/02/2022, 8:59 PM
If the task settings requires changes to the task definition, we need to register a new one. This can be caused by a few things, cc @Anna Geller
Generally this requires setting the
image=None
since we do not know if you have defined an image in a linked task definition.
a

Anna Geller

12/02/2022, 9:06 PM
it's most likely because you enabled logging to cloud watch - disabling that will avoid reregistration
v

Vishnu Duggirala

12/02/2022, 9:06 PM
I see, here is my block settings
I trying it by removing task_customizations attribute
a

Anna Geller

12/02/2022, 9:14 PM
this must be False
Copy code
configure_cloudwatch_logs: bool = Field(
    default=None,
    description=(
        "If `True`, the Prefect container will be configured to send its output "
        "to the AWS CloudWatch logs service. This functionality requires an "
        "execution role with logs:CreateLogStream, logs:CreateLogGroup, and "
        "logs:PutLogEvents permissions. The default for this field is `False` "
        "unless `stream_output` is set. "
    ),
)
z

Zanie

12/02/2022, 10:19 PM
Hm
task_customizations
does not apply to the task definition, just the task run.
Working on some debugging help for this at https://github.com/PrefectHQ/prefect-aws/pull/166
6 Views