Kamilski81
Kamilski81

Reputation: 15107

How can I change the "Database Name" in AWS RDS for Postgresql?

I wanted to create a replicate of my production database for staging and created the staging DB instance from a production snapshot. However, this new instance still has the Database Name: "production-database". I was able to rename the database on PSQl to "staging-databse," but this is not reflected in the AWS Console. I'm afraid that future developers will be very confused, and was wonderign how to rename the "Database Name" on AWS?

Upvotes: 31

Views: 62533

Answers (7)

HuynhThao
HuynhThao

Reputation: 11

You can find and edit with Parameter Groups.

enter image description here

Upvotes: 1

tedro
tedro

Reputation: 71

Yeah, @Badr b got it right, the kicker is that the db name is postgres

Upvotes: 1

MohammadMahdi Javid
MohammadMahdi Javid

Reputation: 81

if you don't specify a name when creating the database using AWS RDS service

AWS RDS Service Database Name

as shown in the picutre currently (2024), database is not created and you have to remove it although it shows up in the console and create a new one

I couldn't find a way to provide the name after skipping this field

TLDR; take a snapshot, remove the previous DB, create new one using previous snapshot, specify the name, no edit option for previous one without name

Happy Hacking 😊

Upvotes: 1

Brett Sutton
Brett Sutton

Reputation: 4554

look on the configuration tab of the writer.

Upvotes: 1

Badr B
Badr B

Reputation: 1403

I created a new free tier instance for small scale testing and this is the DB name I see in my configuration:

enter image description here

I looked everywhere, but could not figure out what my database name is or how to create an initial database. Turns out the database name is postgres. It's also worth noting that I kept the default username, so in this case the username and database name are the same. If you changed the default username and postgres isn't working, maybe try using your username as your database name.

Upvotes: 37

nakulthebuilder
nakulthebuilder

Reputation: 793

Not immediately obvious - when creating a new db expand the Additional Configuration card to create an initial db name

Addtional Configuration

Upvotes: 45

Michael - sqlbot
Michael - sqlbot

Reputation: 178974

Don't use the default database option. All it does is create a custom-named database by default. There may be uses for it, but I never use it, because it seems to serve no purpose at all other than to specify what the database that's created by default (when the instance is first created) will be named.

Database Name

If you want to specify a database name for the default database, type a name for your database of up to 63 alpha-numeric characters. If you do not provide a name, the default "postgres" database is created.

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreatePostgreSQLInstance.html

I assume this is intended to be a convenience for new RDS users, but to me, it seems unnecessary. It has no apparent impact on ongoing operation of the instance, which can, of course, have multiple independent databases on it.

This apparently can't subsequently be changed, so it's more of an annoyance than anything. I always leave this blank.

Upvotes: 27

Related Questions