Restore permission to master user for AWS RDS

Restore permission to master user for AWS RDS

Accidentally lock yourself out of your databases in AWS RDS? No problem!

ยท

1 min read

Scenario

I accidentally lock myself out of the development databases I have in my AWS RDS MSSQL.

Resolution

You can restore the master user permission to the databases in the DB instance by setting a new master user password.

Out of curiosity, I tested and verified that this resolution will also work even if the master user has been configured with

  • Permission to connect to database engine - Deny

  • Login - Disabled

Login Properties in Status Page showing settings for permission to connect database engine and login

Rationale

AWS RDS is a managed service, where AWS has access to the rdsa user that has sysadmin privilege.

Resource

Official AWS Documentation: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.MasterAccounts.html

ย