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...

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则