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 Answer
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
EXPERT
answered 7 months ago
  • Thank you, but its so complicated to me, yet. I guess I wiill have months to study aws to understand all that you said...

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions