Lesson 1 of 4 · AWS Database Administration

AWS Database Services

How AWS is organized, the database services it offers, from Amazon RDS and Aurora to DynamoDB, and how to choose between them.

Beginner 8 sections 8 min read

Databases on AWS

Amazon Web Services (AWS) offers more database services than any other cloud: managed versions of Oracle, SQL Server, PostgreSQL, MySQL, and more, plus purpose-built NoSQL databases. An AWS DBA's first job is knowing what's on the menu, so each application gets the right service.

AWS calls this approach purpose-built databases: rather than one database for everything, pick the service that fits each workload. Underneath, the services share the same building blocks: accounts, regions, networking, identity, monitoring, and billing. Learn those once, and they apply everywhere.

How AWS is organized

Before creating anything, it helps to know where things live in AWS:

ORGANIZATIONall the company's AWS accounts, managed together ACCOUNTbilling and security boundary, such as sales-prod REGIONsuch as us-east-1 (N. Virginia) VPCyour private network private subnet, zone aPrimary DB instance private subnet, zone bStandby S3 storage CloudWatch, …
Account
The basic container in AWS: a billing and security boundary that holds resources. Companies use many accounts, such as separate ones for production and development, and manage them together with AWS Organizations. This is roughly what Azure calls a subscription.
Region and availability zones
A region, such as us-east-1, is a geographic area. Most regions have three or more availability zones: separate data centers with their own power and networking, so a database and its standby in different zones survive one failing.
VPC (virtual private cloud)
Your own private network in a region, divided into subnets. Databases normally go in private subnets, unreachable from the internet. An RDS database is placed in a DB subnet group: a set of subnets in different zones that it, and its standby, can use.
Security group
A virtual firewall around a resource, listing what may connect to it. For a database, it usually allows only the database port, such as 1521 for Oracle or 5432 for PostgreSQL, and only from the application's servers.
IAM (Identity and Access Management)
AWS's service for users, groups, and roles, and the policies that say what each may do, such as creating, changing, or deleting databases. Applications and AWS services use roles rather than stored passwords.

Unlike Azure, AWS has no resource groups as a required level. Related resources are grouped with tags, such as app=sales, which also drive cost reports, as covered in the Cloud Cost Optimization lesson.

AWS's database services

AWS's database services fall into two groups, plus the option of running any database yourself on a virtual machine:

RELATIONAL Amazon RDSsix engines Amazon AuroraMySQL, PostgreSQL Aurora DSQLdistributed, serverless Oracle Database@AWSrun by Oracle, in AWS NON-RELATIONAL DynamoDBkey-value, serverless ElastiCachein-memory cache DocumentDBdocuments Neptunegraph SELF-MANAGED Any database on Amazon EC2 virtual machines full control, full responsibility (IaaS)

Relational services

Amazon RDS (Relational Database Service)
Managed databases for six engines: Oracle, SQL Server, Db2, PostgreSQL, MySQL, and MariaDB. AWS handles the servers, patching, backups, and failover, and you work with the engine you already know. For Oracle and SQL Server workloads that need access to the operating system, RDS Custom gives more control. The Amazon RDS lesson covers it in depth.
Amazon Aurora
AWS's own cloud-built relational database, compatible with MySQL and PostgreSQL. Applications use it like the open source engines, but its storage is spread across three availability zones, giving faster failover and more read copies than standard RDS. See the Amazon Aurora lesson.
Amazon Aurora DSQL
A newer, serverless, PostgreSQL-compatible database that spreads one database across several regions, all accepting writes. It's built for applications that must keep running even if a whole region fails, and supports a subset of PostgreSQL features.
Oracle Database@AWS
Oracle's own Exadata and Autonomous Database services, running on Oracle hardware inside AWS data centers and managed by Oracle. It's the AWS option for Oracle workloads that need features RDS doesn't support, such as Real Application Clusters (RAC), and links to the OCI module later in this path.

Non-relational services

Amazon DynamoDB
A fully managed, serverless key-value and document database that gives fast, consistent response times at almost any scale. There are no servers to size: you pay per request (on-demand) or reserve read and write capacity (provisioned). Global tables replicate data to other regions. It powers many of the busiest applications on AWS, including much of Amazon.com.
Amazon ElastiCache
Managed in-memory caching with Valkey, Redis OSS, or Memcached: a very fast copy of frequently read data that takes load off the main database. Amazon MemoryDB is a related service for when the in-memory data must also be durable.
Amazon DocumentDB
A managed document database compatible with MongoDB, for applications that store flexible JSON-like documents.
Amazon Neptune
A managed graph database for highly connected data, such as social networks, fraud detection, and recommendations.

AWS also has Amazon Keyspaces (compatible with Apache Cassandra) and Amazon Timestream (time-series data). For analytics, Amazon Redshift is AWS's data warehouse, and Amazon S3 is the usual home of a data lake, as covered in the Database Systems lesson.

Self-managed on virtual machines

Any database that runs on Linux or Windows can run on an Amazon EC2 virtual machine (an instance, in AWS terms). It's IaaS: you get full control, including the operating system and features no managed service supports, and full responsibility for installing, patching, backups, and high availability. Choose it only when no managed service supports what you need.

Comparing the managed services

ServiceEnginesData modelTypical use
Amazon RDSOracle, SQL Server, Db2, PostgreSQL, MySQL, MariaDBRelationalMoving existing databases to the cloud; most business applications
Amazon AuroraMySQL- or PostgreSQL-compatibleRelationalBusy open source applications that need fast failover and many read copies
Aurora DSQLPostgreSQL-compatibleRelational, distributedApplications that must keep writing through a regional failure
Oracle Database@AWSOracleRelationalOracle workloads that need Exadata or RAC, close to AWS applications
Amazon DynamoDBDynamoDBKey-value and documentVery high traffic with simple access patterns, such as carts and sessions
Amazon ElastiCacheValkey, Redis OSS, MemcachedIn-memory key-valueCaching, user sessions, leaderboards
Amazon DocumentDBMongoDB-compatibleDocumentContent, catalogs, and user profiles
Amazon NeptuneGraphGraphFraud detection, recommendations, networks

Choosing a service

The application usually decides the engine, and the engine points to the service:

THE APPLICATION NEEDS USE OracleSQL Server or Db2PostgreSQL or MySQL Key-value data at any scaleMongoDB-style documentsA very fast cache RDS for Oracle, or Oracle Database@AWSAmazon RDSAmazon Aurora, or RDS Amazon DynamoDBAmazon DocumentDBAmazon ElastiCache

For PostgreSQL and MySQL, both RDS and Aurora are good choices. RDS is simpler and often cheaper for small and steady databases; Aurora pays off for busy databases that need fast failover, many read copies, or storage that grows on its own. The Aurora lesson compares them.

What every service has in common

Whichever service you pick, most of the DBA's work looks the same:

  • Created and organized the same way, in accounts, regions, and VPCs, through the AWS Management Console, the AWS CLI, or infrastructure as code such as CloudFormation and Terraform.
  • Sized by instance class, such as small burstable classes for development, general purpose classes, and memory optimized classes for demanding workloads, except for serverless services such as DynamoDB.
  • Backed up automatically, with point-in-time restore for up to 35 days.
  • Highly available by placing copies in several availability zones.
  • Secured with the same tools: IAM, VPCs and security groups, AWS Secrets Manager for passwords, and AWS KMS for encryption.
  • Monitored and billed the same way, with Amazon CloudWatch and AWS Cost Explorer.

The Managing Databases on AWS lesson covers these responsibilities across the services.

In practice: three Oracle databases move to AWS

Kofi's company runs three Oracle databases on-premises, each with different needs, so each lands somewhere different on AWS:

DatabaseRequirementDestination
Departmental reporting appStandard Edition 2, no special featuresAmazon RDS for Oracle, License Included
Vendor ERPThe vendor's support requires an agent on the server, and patches applied on their scheduleRDS Custom for Oracle, which allows OS access
Core billingRAC across several servers, and Exadata performanceOracle Database@AWS

The deciding questions are the ones you'd ask on-premises: which edition and features does it use, what does the vendor support, and how available must it be.

Key takeaways

  • AWS resources live in accounts, grouped in an organization, and run in regions, inside private networks called VPCs. Tags group related resources.
  • Relational services include Amazon RDS for six engines, Amazon Aurora for MySQL and PostgreSQL, Aurora DSQL, and Oracle Database@AWS.
  • Non-relational services include DynamoDB, ElastiCache, DocumentDB, and Neptune, each built for a particular kind of data.
  • Any engine can also run on Amazon EC2, with full control and full responsibility.
  • The application's engine usually decides the service. Start with the most managed option that fits.
  • Organization, sizing, backups, high availability, security, monitoring, and billing work much the same across services.