Assigning a domain name to an AWS Fargate task

For most cases, you most likely want to use an ALB/NLB for service discovery. While there are some costs, you also get a lot of benefits: Some DoS protection, scaling metrics, logging, SSL/TLS

However, you can use ECS service discovery.

Service discovery uses Amazon Route 53 auto naming API actions to manage DNS entries for your service’s tasks, making them discoverable within your VPC

and

Public namespaces are supported but you must have an existing public hosted zone registered with Route 53 before creating your service discovery service.

Service discovery requires that tasks use either the awsvpc, bridge, or host network mode.

Here is a Blog entry detailing how to use Service discovery with fargate: https://aws.amazon.com/blogs/aws/amazon-ecs-service-discovery/

Leave a Comment