I have an AWS Fargate task running a web app in a public subnet so it has a public address. My question is how to I connect a domain (through Route 53) to that task, so that nothing breaks when I deploy a new version of it.
- I know I can use ALB/NLB but I want to save on costs.
- I don't want to use the public IP directly as it may change.
- I assume the solution has to do something with the ENI but I'm not sure how to point to it through Route 53.
Any help would be much appreciated.
Thanks
Best Answer
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.
and
Here is a Blog entry detailing how to use Service discovery with fargate: https://aws.amazon.com/blogs/aws/amazon-ecs-service-discovery/