- Newest
- Most votes
- Most comments
To properly diagnose:
- Check ECS task definition port mappings
- Verify service discovery configuration
- Confirm the service registry settings in the ECS service definition
try: Task Definition Level:
{
"containerDefinitions": [
{
"portMappings": [
{
"containerPort": 80,
"protocol": "tcp"
}
]
}
]
}
answered 2 years ago
Hello,
If you want to include the port in the Service Discovery DNS record, please check if you are using SRV records instead of A records.
Also, check the AWS CloudMap console to ensure that the Service Discovery service is correctly configured with the SRV record type.
If you've checked all these points and are still experiencing issues, you may want to consider recreating the service with the correct configuration, as some Service Discovery settings cannot be modified after creation.
Remember, if you're using SRV records, clients will need to be able to resolve SRV records to discover both the IP and port of your service.
More information: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html
Relevant content
asked a year ago
asked 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago

yes task definition has port , we have custom port 3000,