Im new in AWS world. I have a rds mysql database. And i wanna read data from this db in sagemaker, but there is a problem. Actually on local I can read this data like this:
def readFromAWS():
conn = pymysql.connect(host='MY-ENDPOINT', port=3306, user='MY-USERNAME', password='MY-PASSWORD', db='DB-NAME')
sqlText = """SELECT * FROM DB-NAME.XXX order by ID"""
df = pd.read_sql(sqlText, conn)
conn.close()
return df
df=readFromAWS()
And on local it works well. But in sagemaker this code is useless. I need some advice. Are there any other way to read this? Should i use other services to read this data in sagemaker? Can you give me some advice??