Hi I think it is possible to rest Amazon rds password, I mean db password. Is it called master password. I mean RDS-PASAWORD. But any way to see current rds password. I searched internet for a long time and can't find a way to do it?
2 Answers
With a standard RDS, you can't. For security reasons they set it up so that, if you lose the password, the only way to recover is to either guess what it was or to reset it. If this is done properly there is no way for anybody, even if they work for AWS, to know what password you had. This is normal for such systems.
N.B See the other answer for the exception in the case of Elastic Beanstalk.
-
1Then how I'm supposed to know the password if I select auto generate password when creating RDS?– VedmantJan 26 at 22:20
-
@Vedmant normally AWS auto generated passwords turn up on screen just after they've been generated. You click a button to show and then you can copy the password from there.– MichaelMar 10 at 23:22
In reality you can. Works in beanstalk environments.
<?php
echo $_SERVER["RDS_PASSWORD"];
die();
Of course you can always just email it to yourself instead of echoing it out on the page.
-
4This is only valid for special use cases where you're using an RDS instance directly configured from EB. In this case, RDS will automatically set some environment variables in the EB environment.– Xen_marFeb 12, 2021 at 8:47
-
1BTW, validated from here - docs.aws.amazon.com/elasticbeanstalk/latest/dg/… - that this is the actual database master password. I find that "surprising" and slightly in opposition to Amazons standard ways of doing security (I won't call it a "vulnerability" without clear further evidence)– MichaelDec 8, 2022 at 22:31