2 Answers
- Newest
- Most votes
- Most comments
1
I have solved the problem The problem is caused by the fact that the PGSQL engine is 14+ I changed it back to 13.4 and everything is fine.
answered 3 years ago
1
Starting from Postgres version 14 scram-sha-256
is the default password encryption type. And it looks like it is not being supported by the JDBC driver used by Glue.
This is how I solved it in my case.
- Create a new parameter group if using the default parameter group, and attach to RDS
- Changed
password_encryption
tomd5
- RDS reboot may be required
- Connect to DB using existing credentials, this must be using
scram-sha-256
- Create a new user and grant access to the required db/schema:
CREATE ROLE glue_readaccess;
GRANT CONNECT ON DATABASE MY_DB TO glue_readaccess;
GRANT USAGE ON SCHEMA public TO glue_readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO glue_readaccess;
CREATE USER aws_glue WITH PASSWORD '323233232klfdjkfdjkfjkdjfjdfjdkjfdjk';
GRANT glue_readaccess TO aws_glue;
- Check that new user has
encryption_type
to md5, older user should havescram-sha-256
. At this moment both types of users should be able to connect to DB with their respective credentials. - Note: From now onwards all new users would have
md5
password encryption. Even if we reset the password for old users, those also aremd5
- Use this new user
aws_glue
in your Glue connection. This should work. It worked in my case.
answered a year ago
This worked for me too. Thanks @bansalakhil
Relevant content
- asked 7 months ago
- asked 3 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 4 months ago
Actually, the problem is not solved, the Glue connection is working fine with RDS with postgres13.x but not on 14.x or 15.x. I am still struggling as I can't revert back to 13.x