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 Risposta
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
ESPERTO
con risposta 7 mesi fa
  • Thank you, but its so complicated to me, yet. I guess I wiill have months to study aws to understand all that you said...

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande