amazon-ecs-cli
                                
                                
                                
                                    amazon-ecs-cli copied to clipboard
                            
                            
                            
                        Node Container is not able to communicate with Mongo Container ( Both Specified within the ecs-params.yml file )
Node Container is not able to communicate with Mongo Container ( Both Specified within the ecs-params.yml file )
ecs-params.yml file contains task-definitions with two containers node and mongo. docker-compose file also contains node and mongo images.
Hi @AditModi ! How are you trying to reach out from the node container to mongodb? Are you leveraging service discovery (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-cli-tutorial-servicediscovery.html)
If possible I'd recommend to check out two other alternative tools:
- The AWS Copilot CLI where you can 
copilot initonce for your node container and again to deploy your mongo container. Copilot will setup service discovery by default for you, load balancers, support multiple architecture patterns. The documentation is available here. - If you prefer to stay with Docker Compose as your entry point check out the Docker Compose ECS integration.
 
Hi @efekarakus , I got the node and mongo working using this approach Here basically, creating an ecs cluster, also I am creating a task definition with node and mongo containers, and finally an ecs-service for this task definition.
All of this works manually, What I am looking to achieve: I am looking to write certain commands which would create ecs-cluster , ecs-task definition and ecs-service. I followed this approach My node and mongo containers couldn't connect with each other. using ecs-params.yml file and docker-compose.yml file , I would like that to be achieved.
can it be achieved ? If yes, how can it be done?
(Ps - attaching ecs-params.yml file and docker-compose.yml files I have used )
HI @AditModi, have you solved this issue? I am a facing similar issue and would like to know about progress on it.