I'm trying to read files from S3 bucket and load them to RDS DB. I have used AWS Glue Studio and configured a job to run a python script for this load. I have also established a connection between Glue and RDS and added this connection in Job Details.
However, I had to define connection parameters again in the python script to establish connection to RDS like below.
conn = pg8000.connect(host,dbname,user,password);
cur = conn.cursor();
The job is running perfectly fine but I'm wondering is there a way to use the connection given in the Job details instead of hardcoding them in the script.