amazon-ecsaws-service-connect

ECS service unable to connect to another service via service connect


I have gotten propertymanager service to be running on ECS cluster and have enabled the service connect configuration as shown:

enter image description here

This is actually a spring cloud config server serving configuration from S3 bucket. Now I am trying to run another service which will fetch configuration from this service.

In the application.properties file, I have specified the spring.config.import value.

spring.config.import=optional:configserver:http://propertymanager:8888/propertymanager
spring-cloud-config.fail-fast=true
spring.application.name=libraryservice

However, in the logs, it shows a 504 gateway timeout. Shouldn't the service be using the connect agent and communicate directly to the other service?

enter image description here


Solution

  • As discussed, one of the root causes is you need to allow the same Security Group in Inbound Rules of itself if you are attaching it to both services part of ServiceConnect services so they can talk to each other on the Port you are trying to communicate.

    ClientApp(SG1) --> BackendApp(SG1)