AWS database

AWS MySQL: Two Ways to Enjoy MySQL as a Service

[Cloud Volumes ONTAP, AWS, Database, Elementary, 7 minute read, AWS database, B]

There are several options for running MySQL databases as a service on the Amazon cloud. AWS RDS lets you run a managed database instance, which you can still manage directly like you would an on-premise MySQL database. Another AWS database service is Amazon Aurora, which provides an elastic database service that is fully compatible with MySQL.

In this post, we will review RDS and Aurora for AWS MySQL and explain how to create your first database in each service. In addition, we’ll show how NetApp Cloud Volumes ONTAP can help optimize and reduce storage costs for databases on AWS.

In this article, you will learn:

What Is AWS RDS?

AWS Relational Database Service (RDS) is a managed service you can use to orchestrate your databases in AWS. You can run four database options besides MySQL and Aurora on AWS RDS — Oracle, MariaDB, PostgreSQL, and Microsoft SQL Server. The service manages provisioning, failure detection, repair, backup, recovery, and patching for you.

When using RDS, you have the option of selecting from several instance types, including memory, performance, or IO-optimized. You can deploy RDS across multiple availability zones and can use the AWS Database Migration Service to migrate your existing databases.

You should be aware that RDS has size limits, which you can overcome by tiering some of the data to Amazon S3. Learn more in our article on RDS instance size.

How to Create an AWS MySQL Database with Amazon RDS

Creating a new database instance is relatively easy. Below, you can see a tutorial adapted from the AWS documentation. For this tutorial, you can use your existing account or you can test out the configuration in the Amazon free tier.  

1. From the RDS console, select the Region you want to create your database in. You can find this option in the upper right corner.

2. Click Create database. You can find this option in the middle of the page.


create database

Source: Amazon Web Services

3. Select your database engine and click Next.

  • In this case, you want to choose the MySQL option.
  • If you are using the free trial, make sure to also select “Only enable options eligible for RDS Free Usage Tier” in the checkbox at the bottom.

 4. Configure your MySQL RDS Instance with the appropriate settings and click Next.

  • Some example settings you can use are:
    • License model—default general-public-license
    • DB engine version—default version of MySQL
    • DB instance class—db.t2.micro (1vCPU, 1 GIB RAM)
    • Storage type—General Purpose (SSD)
    • Allocated storage—5GB
  • You also need to supply names and passwords for your instance. Make sure that your DB instance identifier is unique for your account and region. If you intend to retain this instance after creation, ensure that your username and password comply with your security protocols.

5. In the Configure advanced settings page, supply the remaining settings information.

  • The settings you need to configure include:
    • Network and security settings
    • Virtual Private Cloud (VPC) information
    • Database name
    • Port and IAM configurations
    • Backup options
    • Monitoring

6. Click Enable deletion, found in the Deletion protection section.

7. Click Create database.

After your instance is created, you can view it from the RDS console. From there you can also connect your database and manage the instance as needed.

What Is AWS Aurora?

AWS Aurora is a fully managed relational database optimized for use in AWS. It supports MySQL and PostgreSQL. With this service, you can combine the cost-effectiveness of open-source databases with increased availability and performance.

Aurora manages and automates patching, backups, hardware provisioning, and database setup for you. It is based on fault-tolerant, distributed, and self-healing storage resources. You can use it across three availability zones and scale it to 64TB per database instance.

Creating an Aurora MySQL Database Cluster

Below, you can find a tutorial that walks you through creating an AWS MySQL cluster in Aurora. This tutorial is adapted from the AWS documentation. In this tutorial, the Easy Create mode is used. This mode enables you to set up a database with standard options. If you want to customize your database, you can do so by turning off this mode.

Prerequisites
There are some prerequisites you need to manage first before you can create your DB cluster. These prerequisites include a VPC and an Amazon RDS DB subnet group. For the VPC, you need to configure one or more subnets in two or more availability zones. For this, you can either use the default VPC or you can create a custom one. Whichever VPC option you choose, you can create and attach it via the RDS console.

1. Open the Amazon RDS console from the AWS Management Console.

2. Select the Region that you wish to create your database in from the upper right corner of the console. 

3. From the navigation pane, select Databases and then select Create database.

  • Make sure that Easy Create is selected when you perform this step.

4. In the Create database screen, configure your database options.

  • You can use the sample options, provided below if you are unsure what to choose:
    • Engine type—Amazon Aurora
    • Edition—Amazon Aurora with MySQL 5.6 compatibility.
    • DB instance size—Dev/Test.
    • DB cluster identifier—leave the default name or choose a custom name
    • Master username—leave the default name or choose a custom name
    • Master password—use an automatically generated password or input a custom password

If you are planning to use this database in your production system, it is recommended that you change the default username. You should also ensure that your password complexity meets your security protocols.


configure database

Source: Amazon Web Services

5. Click Create database.

Once your database is created, you can view your cluster from the RDS console. In the console, you can see the status of both your instance and cluster. Once both display a status indicating resources are ready to use, you can connect your cluster to your instance. This process is not immediate, however. Be prepared that you may have to wait up to 20 minutes before your new DB cluster is ready to use.

Optimizing Database Storage on AWS with Cloud Volumes ONTAP

NetApp Cloud Volumes ONTAP, the leading enterprise-grade storage management solution, delivers secure, proven storage management services on AWS, Azure and Google Cloud. Cloud Volumes ONTAP supports up to a capacity of 368TB, and supports various use cases such as file services, databases, DevOps or any other enterprise workload.

In particular, Cloud Volumes ONTAP helps in addressing database workloads challenges in the cloud, and filling the gap between your cloud-based database capabilities and the public cloud resources it runs on.

Cloud Volumes ONTAP is especially useful for running SQL in the cloud.



Want to get started? Try out Cloud Volumes ONTAP today with a 30-day free trial.

-