Problem when access RDS from Docker Swarm on AWS

Expected behavior

Connect to RDS from Docker Swarm

Actual behavior

Unable to Connect RDS

Additional Information

I created Swarm on AWS based on this page: Then I created RDS. Everything is ok, but I can’t access my RDS. RDS config is Publicly accessible: Yes and Inbound is . So I can telnet from my local computer to RDS. But when I ssh to Swarm Manager EC2, can’t telnet to RDS. My Swarm config Outbound is So I don’t understand what problem is. Could anyone help me to figure out this? Thank you so much!

Steps to reproduce the behavior

  1. Created Swarm on AWS based on (Outbound Node + Manager on Swarm
  2. Created RDS (Publicly accessible: Yes, Inbound:
  3. Can telnet to RDS from other EC2, Local computer
  4. SSH to Swarm manager, and unable to access RDS(telnet)