Intellipaat
Intellipaat

What is Amazon RDS in AWS? – Creating Amazon AWS RDS MySQL Instance

What is Amazon RDS in AWS? – Creating Amazon AWS RDS MySQL Instance
 05th Jun, 2019
 112 Views

In this Amazon RDS tutorial, we will be discussing the concepts of Amazon Relational Database Service. We will learn what is Amazon RDS and how to create an AWS RDS from scratch and connect it your local MySQL shell.

The topics covered in this Amazon RDS tutorial are listed below:

Check out Intellipaat’s End-to-End Amazon RDS Tutorial video:

What Is Amazon RDS?

Amazon RDS is a service which provides database connectivity through the Internet. RDS makes it very simple and easy to set-up a relational database in the cloud.

Instead of concentrating on database features, you can concentrate more on the application to provide high availability, security, and compatibility. RDS is a fully managed RDBMS service.

Benefits of Amazon RDS

benfits of RDS - what is amazon rds

1. Reduced Administration Burden

        • Using RDS, you can easily deploy the database from project conception to production.
        • There is no need to install any database software and provide the infrastructure.
        • AWS automatically installs the latest software patches to the RDS instance which you have launched.

2. Cost-effective

    • You just pay for what you use, and nothing more. No upfront payment is needed, just the monthly usage payment.

3. Security

    • Using AWS Key Management Service (KMS), you can create encryption keys for maintaining security and authorized access for your database.

4. High Availability and Durability

    • The automated recovery feature of RDS enables point-in-time recovery for your database instance.
    • Multi-AZs provide high availability and durability across the globe.

5. Scalability

    • It just takes a few minutes to scale your infrastructure up or down, and you can scale up to a maximum of 32 vCPUs and 244 GiB.

6. Free Tier

    • AWS gives you a free tier usage of Amazon RDS for 750 hours/month for 12 months.

Free tier RDS

Now that we understand what is Amazon RDS and what are its benefits, let’s move on with this Amazon RDS tutorial and learn about various Database engines that RDS offers.

Database Engines

There are six database engines which RDS provides, and they are:

  • Amazon Aurora
  • PostgreSQL
  • MySQL
  • MariaDB
  • Oracle Database
  • Microsoft SQL Server

Database engine

Here’s a discussion on all database engines:

Amazon Aurora

Amazon Aurora is a MySQL and PostgreSQL compatible relational database which is built for the cloud for providing simplicity and cost-effectiveness of open-source databases with the availability and performance of traditional enterprise databases.

  • 5 times faster than standard MySQL
  • 3 times faster than standard PostgreSQL

Pricing

Prices vary according to the region; if you have North Virginia as the region:

  • Database Storage: $0.10/GB/month
  • Backup Storage: $0.021/GB/month

PostgreSQL

You can deploy scalable and highly available PostgreSQL relational databases using RDS and connect them. It only takes minutes to deploy a PostgreSQL instance. RDS PostgreSQL provides the same functionalities as the traditional PostgreSQL, so you can just dump or upload your local database into the RDS.

Pricing

  • Database Storage: $0.115/GB/month
  • Backup Storage: $0.095/GB/month

MySQL

MySQL is the world’s most used and popular relational database, and Amazon RDS provides an easy way to set-up, operate, and scale. You can use the code which you are writing because RDS for MySQL covers all versions of MySQL.

Pricing

  • Database Storage: $0.115/GB/month
  • Backup Storage: $0.095/GB/month

MariaDB

MariaDB is created by original creators of MySQL and it is very popular in creating PHP based applications. All versions of MariaDB is covered by Amazon EDS.

Pricing

  • Database Storage: $0.115/GB/month
  • Backup Storage: $0.095/GB/month

Oracle

Oracle’s relational database is called Oracle Database.

Pricing

  • Database Storage: $0.115/GB/month
  • Backup Storage: $0.095/GB/month

Microsoft SQL Server

Microsoft’s relational database is called the SQL Server. Multiple editions of SQL Server (2008 R2, 2012, 2014, 2016, and 2017), including Express, Web, Standard, and Enterprise, are merged with Amazon RDS, so whatever code your application is built with can be applicable in the RDS.

Pricing

  • Database Storage: $0.115/GB/month
  • Backup Storage: $0.095/GB/month

But for all database engines, ‘data in’ from the Internet is free, only ‘data out’ requires a payment.

 

Hands-on: Creating a MySQL RDS Instance and Connecting It to Your MySQL Shell

Step 1: Login to AWS Management Console

Step 2: Click on RDS in the Services drop-down

RDS

Step 3: Click on Create database. Then, choose MySQL database engine and select the Only enable options eligible for RDS Free Usage Tier checkbox 
Amazon Aurora

Database engines

Step 4: Don’t change any settings in the Specify DB details section. Just go down to the end and provide DB instance identifier, Master username, which is given as intellipaat here, and Master password. Then, click on Next

database settings

Step 5: In the Configure Advanced Settings section, go down to Database options and provide Database name. If you do not provide a database name in this stage, you can create one after connecting with the local shell

Database Options

After that, go down to Backup, select the Backup retention period as 0 days, and uncheck the Copy tags to snapshots box below

Database backup

If you are just practicing and will delete the database after creation, then disable Deletion protection. Else, whenever you want to delete a database, you could just modify Deletion protection and delete it.

database deletion

Step 6: Now, wait till the database is created and the status changes to Available. Click on the View DB instance details button

status

Step 7: Now as it is available, you are going to connect it with your local MySQL shell.

Before connecting it to the shell, click on your database, copy the endpoint of your database, and paste it in a notepad file.

In the below screenshot, Number 1 is the endpoint value and Number 2 is the port number. Both are required for connecting with the local shell.

connectivity and security

Step 8: Open your MySQL shell, and paste the command with your username, endpoint, and port number. Once you hit Enter, your password will be needed. Provide it 

xampp in windows

After entering the password, you would be logged in.

password

Step 9: Now, check whether the database which you created while creating the instance exists. Start using it as a local MySQL database

MySQL

You have successfully created and connected an RDS MySQL instance with the local shell!

Hope this Amazon RDS tutorial helped you learn what is Amazon RDS and difference Database engines that Amazon RDS provides.

 

Related Articles