Managed Databases on AWS: Overview

Now that we know about the different types of databases, let’s see what AWS has to offer.

Because databases are a core piece of technology for most applications, AWS also offers a wide range of database types. All the database types discussed in the last lesson are supported by AWS.

Relational databases on AWS

Relational databases on AWS are all managed under the umbrella of the Relational Database Services (RDS).

RDS databases can be grouped into two categories: databases under the RDS name and Amazon Aurora. Both services offer managed relational databases, but their properties differ.

RDS

RDS branded databases are the oldest and most mature database offerings by AWS. They’ve been available since 2009. All RDS databases are named “RDS for X,” where X is the database engine. Database engine is another way of referring to a database management system (DBMS).

RDS supports the following relational databases engines:

  • PostgreSQL
  • MySQL
  • MariaDB
  • Oracle
  • Microsoft SQL Server

Even though SQL is a standardized language to interact with relational databases, all database engines added additional features on top of the SQL language and therefore behave slightly differently. For simple applications, it might be easily possible to swap out the database engine without any code changes, but this is generally not true for complex applications that use engine-specific features. Therefore, it’s important to pick a compatible database engine when choosing an RDS database.

All RDS databases are built on top of EC2 and EBS under the hood. Therefore, a lot of CLI commands to interact with RDS will be similar to how we interacted with EC2 and EBS. For example, we can create RDS instances just like we created EC2 instances. We just need to specify some RDS-specific parameters.

RDS databases generally offer the following features:

  • Vertical scalability
  • Automatic scaling of storage
  • Highly available deployments through Multi-AZ clusters
  • Backups or snapshots for disaster recovery
  • Support for security groups to restrict network access to the database
  • Encryption of data in transit and at rest
  • Scheduled time slots for maintenance (maintenance windows)
  • Automatic updates and maintenance during these maintenance windows
  • Monitoring of the database through Amazon CloudWatch

Amazon Aurora

Amazon Aurora is a newer managed database service offered on AWS since 2014. Aurora provides MySQL- and PostgreSQL-compatible databases specifically optimized for AWS’s infrastructure. Even though Aurora is provided under the RDS umbrella as well, it behaves very differently compared to the other RDS databases.

Aurora was designed with cloud principles in mind and makes scaling and high availability much easier. To quote Amazon:

>Amazon Aurora MySQL-Compatible Edition and Amazon Aurora PostgreSQL-Compatible Edition take advantage of the benefits of Amazon RDS, including automating time-consuming database administrative tasks and providing improved performance, scalability, and availability compared to community open-source MySQL and PostgreSQL.

The benefits compared to standard RDS databases are as follows:

  • Less manual administrative tasks
  • Improved performance
  • Improved scalability
  • Improved availability

Amazon Aurora uses a different storage architecture under the hood to achieve these properties.

Another big benefit of Aurora is its serverless mode. We don’t need to run a database instance and pay for it per hour (like we would with EC2 and RDS), but rather only pay for the storage (GB-month) and the number of requests (million IOs). Amazon automatically starts, stops, and scales the Aurora database to meet our needs while still being compatible with MySQL and PostgreSQL.

RDS vs. Aurora

The table below lists the differences between RDS and Aurora databases in a compact form:

RDS Aurora
Compatible Engines PostgreSQL, MySQL, MariaDB, Oracle, Microsoft SQL Server PostgreSQL and MySQL
Administration Some manual work required Mostly automated
Performance Baseline Up to 5x faster than MySQL, up to 3x faster than PostgreSQL
Costs Baseline 1/10th
Maximum Number of Read Replicas Up to 5 Up to 15
Maximum Storage Up to 64 TB Up to 128 TB
Serverless Mode Not supported Supported

NoSQL databases on AWS

AWS also offers a wide range of NoSQL databases. It covers all of the database types we discussed in the last lesson:

  • Key-value and document-based NoSQL databases
  • In-memory databases
  • Graph databases

DynamoDB

DynamoDB is a proprietary NoSQL database offered by AWS. It supports both key-value and document data models.

Similar to Amazon Aurora, it’s designed for the cloud and supports an on-demand and serverless mode. Plus, it’s automatically scalable.

Key features of DynamoDB are as follows:

  • Single-digit millisecond latency
  • Optional caching feature through DynamoDB Accelerator (DAX)
  • Serverless mode and automatic scaling
  • Global replication and global tables for a global scale
  • Supports ACID transactions
  • Data encryption in transit and at rest
  • Point-in-time (PTR) recovery, backups, and restore options

In-memory databases on AWS

In-memory databases on AWS are found under the ElastiCache umbrella. AWS offers ElastiCache versions of both Redis and Memcached.

Similar to other database offerings, AWS makes it easy to operate both Redis and Memcached in a scalable, highly available, and fully managed fashion.

Memcached is generally the simpler in-memory database with fewer features. Redis supports complex data types and persistent data, which Memcached does not. The table below shows the differences in more detail:

ElastiCache for Memcached ElastiCache for Redis
Data Format Key-value pairs Complex data types
Submillisecond Latency Yes Yes
High Availability Yes Yes
Automatic Failover in Multi-AZ No Yes
Snapshots No Yes
Read Replicas No Yes

Graph databases on AWS

AWS offers a graph database as well, and it’s called Amazon Neptune.

Amazon Neptune is easily scalable with autoscaling storage (up to 64 TB) and read replicas, supports Multi-AZ configurations for high availability, and provides snapshots for disaster recovery.

Similar to other database offerings on AWS, it’s fully managed and supports data encryption.

Get hands-on with 1200+ tech skills courses.