Is there a way to name containers when they start through ECS? Wondering because I'm currently using Datadog to monitor the system usage and the containers are named something long etc like
ecs-datadog-agent-task-1-datadog-agent-c0a1f3e8d9e58dd5e901
would like to set my own name
No, there is not a way to control the name used for the container in Amazon ECS. ECS picks a random name designed to avoid conflicts (since names must be unique in Docker; you can't have two containers with the same name) and you can see the code here.
However, ECS does give you a few things that might be able to help you. There are automatically-assigned Docker labels for the task ARN, the container name in your task definition, the task definition family, the task definition revision, and the cluster; see here. Additionally, you can assign your own custom Docker labels through the task definition.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With