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.

已提問 7 個月前檢視次數 537 次
1 個回答
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
專家
已回答 7 個月前
  • Thank you, but its so complicated to me, yet. I guess I wiill have months to study aws to understand all that you said...

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南