26

I have an existing database in a RDS AWS PostgreSQL instance. I need to create one more database in this instance as spinning up a separate cluster will be expensive. There doesn't seem to be any option to create one more database inside this instance. I understand that I can create a separate schema for this purpose(like in MySQL) but I need to keep the resources for these separate and hence the need for a separate database.

Please let me know if it is possible. PostgreSQL 9.6.5

asked Jan 9, 2018 at 0:10
0

1 Answer 1

33

I believe you can. Based on AWS RDS FAQs:

Q: How many databases or schemas can I run within a DB instance?

  • RDS for Amazon Aurora: No limit imposed by software
  • RDS for MySQL: No limit imposed by software
  • RDS for MariaDB: No limit imposed by software
  • RDS for Oracle: 1 database per instance; no limit on number of schemas per database imposed by software
  • RDS for SQL Server: 100 databases per instance
  • RDS for PostgreSQL: No limit imposed by software

You can create additional database by connecting to you DB instance and do a CREATE DATABASE. Check this guide

To create additional databases, connect to the DB instance and use the SQL command CREATE DATABASE.

And the blog post on how to create new database in an existing PostgreSQL DB Instance:

psql --host=SOME-DBMS-HOST --dbname EXISTING_DB \
 --username=YOUR-USERNAME --password \
 --command="CREATE DATABASE new_database WITH OWNER some_owner"
answered Jan 9, 2018 at 2:44
3
  • 1
    The key here is make sure you connect to the EXISTING_DB Commented Nov 27, 2019 at 16:27
  • instead of connecting to the db instance and running create database, can it be done from a cloudformation template? Commented Apr 29, 2021 at 12:05
  • Seems you cannot yet create multiple DBs with cloudformation: github.com/aws/aws-cdk/issues/13588 Commented Jan 21, 2022 at 8:48

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.