Connecting container to external Host

Hello, I’m trying to connect my tomcat container built locally to the external mysql host which is in AWS. How to make it connect ? I tried driver overlay using Docker Swarm and also tried creating new bridge but nothing is working fine for me. Could anyone help me on this? How to create user defined bridge with giving subnets and gateway ip, what IP address I have to give?

I used the host full name.
Working with SQLAlchemy, the statement has the following structure:

create_engine('mysql+pymysql://user:pass@host.name:3306/db')
Hope it helps