The next steps will involve configuring the Frontend and Backend in separate ECS Services. However, we don’t have a way for the services to communicate with each other (even though they are in the same cluster). Therefore, in this section, we will configure Namespace and Service in Cloud Map.
Once we have the Service Discovery Name, the Frontend Service can use that “name” to resolve the IP address of the Backend Service, allowing the Frontend Service to communicate with the Backend Service.
Search for Cloud Map
on the AWS console
In the namespace section
In the create namespace interface
fcjresbar.internal
Use for internal API Calls and DNS
Next
Our namespace has been successfully created
Now, we will create a service in the newly created namespace
Fill in the following information to create the service
backend
Backend Service Discovery Name
With the service name backend, the full Service Discovery name for the Backend will be backend.fcjresbar.internal
. Make sure to copy this name as we will need it when configuring the Task Definition for the Frontend service.
Next, in the DNS Configuration section
Now, we need to wait for a while until the service is fully created.