Configuring Private DNS Name/Hostname for ECS Fargate Container in a Private Subnet


Hello all,

I'm currently working with ECS Fargate containers deployed in a private subnet and facing a challenge in configuring the private DNS name or hostname for these containers. I'm looking for guidance on how to achieve this.

Here are the details of the situation:

  • Infrastructure Setup: The ECS Fargate containers are deployed in a private subnet.
  • Objective: I want to configure a private DNS name or hostname for these containers to facilitate communication within the private network.

If anyone has experience or insights into how this can be accomplished, I would greatly appreciate your assistance. Additionally, if there are best practices or recommended approaches for setting up private DNS names for ECS Fargate containers in a private subnet, please share them.

Your expertise and guidance will be invaluable in resolving this matter. Thank you in advance for your help!

1 Answer
Accepted Answer


By configuring Service Discovery, you can set a domain for the container.

I hope the following documentation tutorials will be helpful.

profile picture
answered 3 months ago
profile picture
reviewed 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions