To create your Postgres database in AWS, first sign into your account and search for RDS in the AWS Management Console.
Click Databases on the left sidebar.
Click the orange Create database button on the top right side of the page. Now you can start selecting options for your new database.
Select Standard Create to customize the database configuration.
Select PostgreSQL to create a Postgres database, then leave the default version.
Select a template for your use case
Production - For production-grade deployments.
Dev/Test - For development, testing and performance measurements.
In Settings enter the following:
DB Instance Identifier - prod-mirthdb
Master Username - postgres (username for your database such as admin, dev, qatest, etc..)
Master Password - XXXXXX (Password for your database)
DB Instance Size - The DB instance class determines the computation and memory capacity of an Amazon RDS database instance. The database instance class you need depends on your processing power and memory requirements. For more details please refer to the following:https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html
Storage Size - Specify the storage requirements for your database. You also have the option to enable storage autoscaling so that your database is dynamic and scales automatically.
Storage type - SSD
Availability & Durability - This option is to create a standby database in case of an outage so that your database is always up and functioning.
Connectivity - Specify the following connectivity configurations:
VPC — the VPC that defines the virtual networking environment for this DB instance
Subnet group — the subnet group that defines which subnets and IP ranges the DB instance can use
Public accessibility — whether the database is publicly accessible
VPC security group — the security groups that will allow incoming traffic outside your VPC
Availability zone — improves high availability by isolating failures from other Availability Zones
Database port — the TCP/IP port that the DB instance will use for application connections
Database authentication - In this section, choose how you would like to authenticate your database credentials from the following options:
Password authentication — Manage your database user credentials through your DB engine’s native password authentication features.
Password and IAM database authentication — Manage your database user credentials through your DB engine’s native password authentication features and IAM users and roles.
Password and Kerberos authentication — Manage your database user credentials through your DB engine’s native password authentication features and an AWS Managed Microsoft AD created with AWS Directory Service. This way, you can centrally store and manage user credentials, instead of individually for each DB instance.
Select Password Authentication
Expand Additional Configurations.
Database options:
Initial database name - mirthdb
Backup - Ensure that the Enable automatic backup option is enabled.
Deletion Protection - Ensure that his option is enabled.
Click Create Database. Wait a few minutes. The Database creation may take a while.
Go to RDS -> Click Databases in the left panel -> Select prod-mirthdb (or your DB instance name)