In this session we are going to learn about Relational Databases and how to create Relational Database instances in AWS.
The RDS is a Relational Database service which is introduced by AWS. Using RDS, relational database instances can be created.
Let’s look at the procedure that should be followed in order to create a relational database using RDS.
First, go to your AWS management console and search for the RDS service. Then you will be prompted into the RDS dashboard as shown in figure 1. As we don’t have any databases created, it wouldn’t show any. Click on DB instances in Resources.
Then select create databases icon.
Now we have to choose a database creation method. You can select either Standard Create or Easy Create. In standard create, we can configure options, availability, security, backups, etc. We can modify the database as we prefer.
On the other hand, the easily create option is more like one-click creation. Only a few options can be changed according to our preference.
Let’s select Standard Create as shown in figure 3.
Then we have to choose the database engine. AWS supports Amazon Aurora, MySQL, MariaDB, PostgreSQL, Oracle and Microsoft SQL server. You can select any engine. Let’s select MySQL here.
Then select the edition of the selected engine type. Then select the version as shown in figure 5.
There are three types of templates available; Production, Dev/Test, and Free tier. Select the template according to your requirement.
If high availability, fast and consistent performance is needed select the production template. For development processes and similar use cases select Dev/Test template. We are going to use the Free Tier template.
Then let’s configure the settings. Give a name to your database instance in the DB instance identifier. We have given it as MyFirstDB.Then give a master username, a password according to your preference.
We can select the DB instance size according to our requirements. Since we are using the free tier we only have one option (Burstable classes) and bounded to it. If you are using any other template, you can select from the other options.
You can select either General purpose (SSD) or Provisioned IOPS (SSD) for Storage type. In here, we have selected General Purpose (SSD). Then allocate storage as per your requirements. The minimum is 20GiB.
Then we can enable or disable the autoscaling feature. What this feature does is it will increase the storage once the specified threshold level is exceeded. Let’s enable it. Then give a threshold level. The charges will apply once it exceeded that limit.
For the free tire, the availability and durability is Multi- AZ deployment.
Then for the subnet group, apply the default VPC as shown in figure 11. For the accessibility, we selected public accessibility to yes. But, in the real scenario, we don’t want others to access our DB.
For the VPC security group select the Create new option. Give a name. Select the availability zone as no preference and keep the default port.
Set the Database authentication as Password authentication.
Then let’s configure the additional options. Give a name for the initial database name, we have given it as WelcomeDB. Then keep the default values for the DB parameter group and Option group.
Enable the automatic backups. This will automatically backup the database. You can retain the backups of your database for a specific time period. In here, we have given the time period as 7 days.
Then select no preference for the backup window.
Select the options which fit your preferences in the monitoring section. You can display different types of log reports. Enable the enhanced monitoring option if you want to see how the different processes utilize the CPU.
The maintenance section can be used to configure the maintenance options. Tick the Enable auto minor version upgrade and select no preference for the Maintenance window.
At the end of the configurations, it shows the estimated monthly costs. Refer to it carefully to know about the costs related to configured settings. Then click Create database.
Then in the dashboard, you can see the database that we created. But, the status shows it’s still creating. It will take some time to finish creating it.
Click on the database name. Then it will display the connectivity and security of your database. Look at the Endpoint and port section. Using this URL, you can connect your database to other applications.
There are multiple tabs. From the monitoring tab you can observe the CPU utilization, DB connections statistics as shown in figure 19. From the Logs and events tab you can see the logs and events that occurred with the timestamps as shown in figure 20.