[Click to see RDS settings](https://i.stack.imgur.com/YXwH3.png)
Im trying to connect to a MYSQL server on Amazons Web Service, specifically the RDS- using SQLAlchemy in python (Pycharm).

I've already installed drivers for pymysql to include in the connection string for the engine (engine = create\_engine("mysql+pymysql://...).
I've tried setting the CIDR security group inbound and outbound rules to allow any IP.
I can connect to the AWS-RDS just fine from MYSQL Workbench suing the Endpoint, Port and credentials.
I was able to connect to a local instance of MYSQL using SQLAlchemy and create\_engine(...) without any issues too.
I've tried including and excluding the port from the URL.

```
try:          # exception handling for database creation/ existence
    engine = create_engine(link_to_db, pool_pre_ping=True, pool_recycle=3600)   # Access the DB Engine
    connection = engine.connect()
    print("Database conn 1 successful")
except Exception as e:
    logging.exception(e)
    print("error connecting to db")

```

where link\_to\_db is "mysql+pymysql://{RDS USERNAME}:{RDS PASSWORD}@
{RDS ENDPOINT}:3306/{DATABASE NAME}"

The expected result is 
"Database conn 1 successful" 
printed to the output.

Errors :
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on '{RDS URL}' ([Errno 11001] getaddrinfo failed)")
(Background on this error at: <http://sqlalche.me/e/e3q8>)