Hey folks :simple_smile: We are using ECS Agent to...
# ask-community
a
Hey folks simple smile We are using ECS Agent to execute flows. Is there a way to apply custom tags to the ECS task that is executed?
a
@ale do you need that for billing purposes? In general, you can add tags to your cluster to which you deploy your ECS agent and all the ECS tasks for your flows deployed to that cluster would inherit those tags.
Copy code
aws ecs create-cluster --cluster-name prefectEcsCluster --tags key=team,value=devs
You can find more details here
a
Thanks Anna! ๐Ÿ™Œ
cc @Giacomo Consonni @grandimk
Well, we do have the right tags on the cluster. But for some unknown reason, they are not applied to tasks running on the cluster ๐Ÿ˜…
We might need to enable tag propagation
Weโ€™ll investigate
a
Correct, this flag seems to be relevant: --propagateTags Keep us posted, itโ€™s an interesting topic. I think in the worst case, maybe you could track the costs just via the ECS cluster provided that all flows are deployed to the same cluster and only to that cluster.
๐Ÿ‘ 1
a
Hey @Anna Geller ๐Ÿ‘‹ I confirm that using
propagateTags
did the trick! We used this config:
Copy code
enableECSManagedTags: true
propagateTags: TASK_DEFINITION
a
Nice work and thanks for sharing!