The following link provides access to an excellent blog on the subject.
https://www.crunchydata.com/blog/postgresql-defaults-and-impact-on-security-part-1
see pg_has_role
select pg_has_role(<role-name>); -- returns true of false
Assuming a Role
Gaining access to a given role may only be gain by “using” that role directly, which can be accomplished one of three ways:
1.) SET ROLE
to switch that role
3.) Your current role has inherited access to the role in question
How is this impacted when you are using AWS RDS Postgres or AWS. RDS Aurora with Postresql option?