Route internal requestes from Microservices in private subnet in AWS

Viewed 21

I have a couple of micro-services deployed using ECS in a private and public subnets. These microservices are choreographed so they request each other with REST and need to know each other's IP locations. Currently I am not having any domain with route 53 to subdomain use it, so whenever I stop and start the services I have to update the tasks with new IPs every time and connect the services. Any ideas on how I can create a routing table or something similar where my ENV params remain same but request to those IPs from ENV params are redirected to correct IPs. I don't mind updating the routing table every time.

enter image description here

1 Answers

AWS CloudMap integrates with ECS to provide custom internal DNS names for your services, that resolve to the current internal IP address of the services.

Alternatively, you could look into AWS AppMesh to create a service mesh. This is a bit more advanced than CloudMap, but also more flexible.

Related