I'm using CDK (via the Typescript lib) to setup my network infrastructure on ECS. There are some background workers that often report errors to a Slack channel and I'd like to assign random hostnames based on their names, something like worker-<generated-name>.internal or web-<generated-name>.internal.

These don't have ELB or anything, they're internal services with no exposure to the web. But I still would like to have better names than ip-10-10-10-10.internal on my monitoring tools.

  • I suspect there will be just as many people advocating for this as against it. I don't like it myself, but I also don't like a lot about AWS. This data is useless and isn't consumable or cross-referenceable to other sources.
    – Greg Askew
    May 14 at 0:03
  • I'm mainly interested in understanding what type of service is it based on the hostname. It does sound like something useful to me, but I'm open to alternatives, considering my monitoring tool (Appsignal) identifies the hosts by their hostnames. May 14 at 1:16
  • Also is this a question appropriate to server fault or stack overflow? If this is the wrong place to ask, please close the question. May 14 at 2:04

1 Answer 1


You can set the hostname for tasks on ECS: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html (search for hostname)

However it is apparently not available for tasks with awsvpc network mode, which in turn means that it won't work for Fargate tasks. Only on those running on ECS hosts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.