Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while automating time-consuming administration tasks such as hardware provisioning, database setup, patching and backups. You can deal with actual business requirements so that your applications get the performance, availability, security and compatibility they need.
This is a brief step by step guide how to create a database with RDS.
Log on your AWS account and search for RDS. Just click „Launch a DB Instance“.
1. Select Engine
In this case I select PostgreSQL but you can select also another one. The following configuration is the same.
2. Choose your purpose
If you select Production you also get a second shadow instance but you won’t see it. Why the second instance? You can update database versions without downtime. I verified it while running load tests and some requests were failing over a time range of one second. A downtime of one second isn’t too bad 😉
3. Specify your DB
Choose a DB Engine Version you like. Normally I use the smallest DB Instance Class, because I can upgrade on the fly without downtime. It is a good choice to lower the costs at the beginning.
Activate Multi-AZ Deployment for a better availability. The Storage Type can be General Purpose (SSD). Only systems with really heavy load need Provisioned IOPS (SSD). Allocate only 5 GB. It will also lower the costs and you can increase the amount on the fly without downtime. Some of my databases with more than 1 million entries are running in product mode with only 5 GB.
4. Configure Advanced Settings
In the Network & Security section choose a VPC. The VPC controls the accessibility of your database. If you already have EC2 instances and only these need access to the database, choose the VPC of the EC2 instances. In this case you can select “No” at Publicly Accessible. I choose the Default VPC and selected “Yes” at Publicly Accessible, because I like to access the database from my local PC.
The VPC Security Group defines which ports are open or closed. For now create a new one. Is the database secure? It depends on the Network & Security configuration.
Enter your preferred Database Name.
For instance, if you like to change the database connection limit, the DB Parameter Group is the right place.
Congrats to your first cloud hosted database 🙂
To be sure you need to check the Security Group that you can access the service.
When the database is finally launched you can connect to it with a client like pgAdmin.