0

I am using the ECS Fargate launch type. I am deploying Spring based microservices. Every service registers itself to AWS CloudMap. Now I am trying to communicate between two microservices using the RestTemplate.

I call the services by their DNS endpoint (e.g.: auth.mynamespace.local:8080/login). I get a 404 response every time. The security groups around the microservices are transparent on port 8080 for the corresponding inbound group.

One note: Everything is private. I don't associate a public IP and also the CloudMap namespace (R53 hosted zone) is a private one.

I really can't get behind why I am getting all those 404 errors with my RestTemplate.postForEntity(...).

DerPauli
  • 63
  • 1
  • 11
  • 1
    If you launch an instance in your vpc, and manually try to call your services, doe they work? Also do you get the private dns resolved correctly tho the ips? Can inspect that using `dig` command. – Marcin May 15 '20 at 22:57
  • Thanks for your answer. I did exactly that and (happened many times to me) I was so fixated that its some kind of connection problem that I didn't see the forest for the trees. The 404 error was as simple as forgetting the @RestController on my microservice. – DerPauli May 17 '20 at 20:39

0 Answers0