11

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?

1
  • I typed your question into Google and found this article on the AWS website. Does it help?
    – Tim
    Jan 27, 2019 at 8:17

2 Answers 2

12

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.

2
  • 1
    Then how I'm supposed to know the password if I select auto generate password when creating RDS?
    – Vedmant
    Jan 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.
    – Michael
    Mar 10 at 23:22
1

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.

2
  • 4
    This 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_mar
    Feb 12, 2021 at 8:47
  • 1
    BTW, 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)
    – Michael
    Dec 8, 2022 at 22:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .