How to make backend and frontend comunicate in tha same cluster in ECS?

0

Hello, people. I've made deploy of my backend and frontend application in ECS. The backend uses Java & Springboot in a docker container. The frontend uses Angular 11 in a docker container. The backend is working: I have tested the endpoint in postman!

But I have a issue in frontend: the APIUrl points to "http://localhost:80/myContext". And when I try to make requisition by the frontend, I receive "connection refused".

I have read that, if I put both containers in the same cluster, frontend and backend could comunicate by "localhost". But it is not working... Please, help.

1 Antwort
0

Hi,

Amazon ECS Service Connect is probably what you want to implement to achieve communication between your containers in the simplest possible manner.

See https://aws.amazon.com/blogs/aws/new-amazon-ecs-service-connect-enabling-easy-communication-between-microservices/ for all details

Reference documentation is here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html

Best,

Didier

profile pictureAWS
EXPERTE
beantwortet vor 7 Monaten
  • Thank you, but its so complicated to me, yet. I guess I wiill have months to study aws to understand all that you said...

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen