[Python] Connect to AWS RDS with sqlalchemy and read SQL with pandas


from sqlalchemy import create_engine 

url = "{AWS rds db url: postgresql://{user}:{password}@{rds endpoint}:{port}/{DB name}}"

engine = create_engine(url)
connect = engine.connect()

query = "select * from {table name}"

# output is pandas dataframe
dataframe = pd.read_sql(query, con=connect)