MongoError: no mongos proxy available

Our company has a frontend and backend node-js application which is up and running on AWS EC2 instance and successfully connecting to MongoDB Atlas. When we tried to docrise the application we had trouble connecting to MongoDB. The dockerised application is running on the same AWS EC2 but opening a different port. (We are unable to deploy it to another EC2 instance.)

I have inspected the docker container and confirmed it has internet access, checked the connection string and AWS EC2 security group to confirm the network setting, but couldn’t resolve issue.

Does anyone have any idea what could go wrong?

Thank you for your help in advance.

Abby

Did you manage to fix this ?