AWS Database Layer

Divya MahajanDivya Mahajan
6 min read

Link to exam: https://aws.amazon.com/certification/certified-cloud-practitioner/


Introduction

Databases Overview

  • Databases provide structured storage with indexing and relationships.

  • Relational Databases: OLTP: RDS & Aurora (SQL)

  • NoSQL Databases: Purpose-built, flexible, and scalable.

  • AWS Shared Responsibility: Managed databases offer quick provisioning, OS patching, high availability, horizontal scaling, and automated Backup & Restore.

Database Deployment and Scalability Options

  • Read Replica: For high scalability, scale read workload, write to main, read from many.

  • Multi-Availability Zone: For high availability, failover DB, passive not accessible until main DB fails, read, and write to main.

  • Multi-Region: For disaster recovery, local performance, write to main, read from local

  • Sever-Based: Give instance size (CPU, memory, storage etc.), auto scales out but scale up is manual.

  • Server-Less: No management overhead, auto scales in/out or up/down based on workload.


Relational vs. Non-Relational Databases

When it comes to choosing the right database for your application, one of the fundamental decisions you'll face is whether to opt for a relational or non-relational database. Each type offers distinct advantages and use cases, making it essential to understand the differences between them.

AspectRelational DatabasesNon-Relational Databases
Data StructureStructured with tables, rows, and columnsFlexible, schema-less or schema-on-read
Schema DefinitionRequires predefined schemaDynamic schema or schema-less
Query LanguageSQL (Structured Query Language)Various query languages depending on database
ScalingGenerally vertically scalableHorizontally scalable
Data IntegrityEnforces ACID properties for transactionsMay sacrifice some ACID properties for scalability
Use CasesTransactional applications, reporting, analyticsBig data, real-time applications, IoT, gaming
ExamplesMySQL, PostgreSQL, Oracle, SQL ServerMongoDB, Cassandra, DynamoDB, Redis

Figure 1 - AWS Database Services


AWS Relational Database Services Table:

Relational Database ServiceDescriptionFeaturesUse Cases
RDS (🖥️)Managed relational database service (MySQL, PostgreSQL, Oracle, SQL Server, etc.)Quick provisioning, automated backups, high availability, horizontal scaling, read replicas. Backed by EBS, no SSH access to instances.OLTP, Transactional Workloads
Aurora (🖥️)High-performance, MySQL (5X) and PostgreSQL (3X)-compatible relational database engine.Automated replication, scaling, up to 128TB. Highly optimized for read-heavy applications.High-Performance, Scalable Workloads
Aurora Serverless (☁️)On-demand CPU, memory, storage etc., based on usage. Auto DB instantiatedAuto- vertical, scaling based on usage, pay per second.Unpredictable Workloads, unpredictable traffic patterns, Infrequent Access
Redshift (🖥️)OLAP DB based on PostgreSQL, Petabyte scale.Columnar storage, massively parallel processing, integrates with BI tools,OLAP, Data Warehousing, Analytics
Redshift Serverless(☁️)Designed for analyzing large datasets.Pay only for compute and Storage used during analysis and not instance provision

Symbols Legend:

  • 🖥️: Not Serverless

  • ☁️: Serverless


AWS Non-Relational Database Services Table:

Non-Relational Database ServiceDescriptionFeaturesUse Cases
ElastiCache (☁️)Managed Redis or Memcached in-memory caching service.Improves performance by caching frequently accessed data, reduces load on databases.Caching, High-Performance. Ideal for improving latency-sensitive applications.
DynamoDB (☁️)Fully managed NoSQL database service for low-latency applications. AWS Proprietary.Single-digit millisecond latency, auto scaling, multi-region replicationReal-Time Analytics, Gaming
DynamoDB Global Tables (☁️)Multi-active and multi-region databaseAutomatically replicate changes from any replica to the replicas in the other regions.Low-latency access to the data no matter where they are located.
DynamoDB Accelerator (DAX)(☁️)Low-latency data access.microsecond latency,caching for DynamoDB only
DocumentDB (🖥️)Fully managed MongoDB and JSON- compatible document database service.Scalable, highly available, automatic backups and software patching, fully managed.Content Management, Personalization
Neptune (☁️)Fully managed graph database service.Auto-replicates data across multiple AZ.Social Networks, Recommendation. Applications with complex relations bwn data entities.
Timestream (☁️)Fully managed time series database service.Optimized for storing and analyzing time-series data, scales based on demand.Time-series data by IoT devices for Data Analytics, DevOps
Quantum Ledger Database (QLDB) (☁️)Fully managed central DB ledger database service for tracking data changes over time.Immutable, cryptographically verifiable, Central DB owned by AWS.Financial Transactions, Compliance
Managed Blockchain (☁️)Managed decentralized multi-party transactions service for creating and managing blockchain networks.joining public or creating private blockchain networks, Compatible with Hyperledger Fabric and Ethereum,Supply Chain Management, Finance, Eliminates the overhead of managing infrastructure.

Symbols Legend:

  • 🖥️: Not Serverless

  • ☁️: Serverless


AWS Database Utility Services

ServiceDescriptionFeatures and Additional InformationUse Cases
EMR (Elastic Map Reduce) (☁️)Managed Hadoop clusters for big data processing.Elastic scaling, supports Hadoop ecosystem, cost-effective processing of large datasets.Big Data Processing, Data Lakes
Athena (☁️)Query service for analyzing data stored in S3 using SQL. Interactive Query ServicePay-per-query you run pricing, integrates with various data sources.Ad-Hoc Queries, Data Exploration
QuickSight(☁️)Serverless business intelligence service for creating interactive dashboards.Easy visualization of data, integrates with other AWS services.Business Intelligence, Reporting
AWS Glue(☁️)Managed ETL service for preparing and transforming data.Data catalog service, integrates with various AWS services.Data Integration, Data Transformation, ETL for analytics
DMS – Database Migration Service (☁️)Quickly and securely migrates databases to AWS while still being able to use old DB during migration.Minimizes downtime during migrations, supports a wide range of source and target databases.Cloud Migration, Database Replication

Symbols Legend:

  • 🖥️: Not Serverless

  • ☁️: Serverless


Summary:

Introduction to Databases:

  • Databases provide structured storage with indexing and relationships.

  • Relational databases (like RDS and Aurora) suit transactional workloads.

  • NoSQL databases offer flexibility and scalability.

  • AWS Managed databases ensure quick provisioning, high availability, and automated backups.

Database Deployment and Scalability Options:

  • Various options (e.g., Read Replica, Multi-Availability Zone, Multi-Region) offer scalability and high availability.

  • Deployment options range from server-based instances to serverless configurations.

Relational vs. Non-Relational Databases:

  • Relational databases enforce structured schemas and ACID properties, suitable for transactional applications.

  • Non-relational databases provide dynamic schemas and horizontal scalability, ideal for big data and real-time applications.

Relational Database Services:

  • RDS: Managed relational database service.

  • Aurora: High-performance MySQL and PostgreSQL-compatible engine.

  • Aurora Serverless: On-demand auto-scaling version of Aurora.

  • Redshift: Data warehousing optimized for analytics.

Non-Relational Database Services:

  • ElastiCache: Managed Redis or Memcached in-memory caching service.

  • DynamoDB: Fully managed NoSQL database service.

  • DynamoDB Global Tables: Multi-active and multi-region database replication.

  • DynamoDB Accelerator (DAX): Cache for DynamoDB, microseconds latency

  • Neptune: Fully managed graph database service.

  • Timestream: Fully managed time series database service.

  • QLDB: Fully managed central ledger database service.

  • Managed Blockchain: Managed decentralized multi-party transactions service.

AWS Database Utility Services:

  • EMR: Managed Hadoop clusters for big data processing.

  • Athena: Query service for analyzing data stored in S3 using SQL.

  • QuickSight: Serverless business intelligence service for interactive dashboards.

  • AWS Glue: Managed ETL service for data preparation and transformation.

  • DMS: Database Migration Service for seamless migrations to AWS.WS.

0
Subscribe to my newsletter

Read articles from Divya Mahajan directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Divya Mahajan
Divya Mahajan

Experienced Technical developer with 6+ years' global collaboration. Proficient in Python, Go, React, Next.js, Django, various databases, Cloud & DevOps (AWS EC2, Docker, Kubernetes), and Big Data tools. Skilled in data structures and algorithm, API development, and end-to-end software engineering. Excels in back-end development, front-end design, Root Cause Analysis, and product management to deliver superior user experiences. Holds a master’s degree in computer engineering.