I am running a docker swarm cluster and I was trying to connect to a private RDS instance within the same VPC from a docker container which is running in an EC2 within the same VPC but I get an error like "unknown host". I have enabled the database port number(3306) in RDS security group for my EC2 instances.
However, I am able to connect to the database from the host level but not from the container level.