I need to remove roles and users from postgres AWS RDS.

Can you please suggest on this issue, please share the queries for this.

closed as off-topic by dezso, Philᵀᴹ, McNets, mustaccio, Daniel Vérité Jun 26 '17 at 14:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – dezso, Philᵀᴹ, McNets
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    Can't use DROP ROLE? – McNets Jun 26 '17 at 9:21

If the account is authorised in postgres its just the same command as it would be in a normal postgres server: dropuser -h your.rds.db -U you SteBov would hit me for example

for full details look here: https://www.postgresql.org/docs/current/static/app-dropuser.html

dropping groups is near enough the same, documentation here: https://www.postgresql.org/docs/current/static/sql-dropgroup.html

  • I want revoke for particular user ,particular role like that am have 100 users and want to revoke some permissions for specified users at once Is there any script for this – Yerva Mahendra Reddy Jun 28 '17 at 6:52
  • Is there a way to identify them within the database? from what you're saying here it sounds like you need a new group to allocate those users to and remove them from the current ones. Personally when I'm doing a large update on that scale I take all the entities to change into excel and then concatenate it with the command, so alter group {group} drop username {user} (with the connection details) then the associated add to the new group – Ste Bov Jun 28 '17 at 7:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.