- Newest
- Most votes
- Most comments
Hi,
I would say that you have built the frontend using a client-side rendering framework (such as React, Vue, or Angular), so it is the browser that makes the request to the backend, not the frontend container, and it is not able to resolve the private DNS.
If so, you should expose the backend to the Internet in the same way as the frontend and call it using a public DNS.
Hello,
Actually I am calling the backend service from the front-end code. Only once the frontend is loading it is calling the backend service. Can you please let me know when the should the namespace be used and when not?
Hi,
Since the frontend code is executed on the browser, the backend service must accept external connections from the internet, and AWS recommends using an Elastic Load Balancing for it. Take a look at the link, it explains it very well.
On the other hand, you could use Amazon ECS Service Connect, Amazon ECS service discovery or AWS App Mesh when you need an application to connect to other applications that run in Amazon ECS services, but I think that is not your case.
Hi Mike,
Thanks for the information. I am using the ecs service connect in my application for both frontend and back-end. They are in the same namespace. With the backend acting as server and frontend as client. Only thing here is that I have both of these services in the private subnet. Only frontend application is available to the internet via the dns and the private ALB.
Relevant content
- asked a year ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 9 months ago
I also have the same problem. I can't seem to find a way to fix it.