Skip to content

Other_databases


AWS offers specialized database services for specific use cases beyond traditional relational and NoSQL databases.

AWS Database Services
+------------------------------------------------------------------+
| |
| +------------------------+ |
| | AWS Databases | |
| +------------------------+ |
| | |
| +--------+--------+--------+--------+--------+ |
| | | | | | | |
| v v v v v v |
| +------+ +------+ +------+ +------+ +------+ +------+ |
| |DocumentDB| |Neptune| | Timestream| | Keyspaces| | QLDB | |
| | | | | | | | | | | |
| |MongoDB | |Graph | |Time | |Cassandra| |Ledger| |
| |compat | |DB | |series| |compat | | | |
| +------+ +------+ +------+ +------+ +------+ +------+ |
| |
+------------------------------------------------------------------+

Amazon DocumentDB
+------------------------------------------------------------------+
| |
| Purpose: MongoDB-compatible document database |
| |
| Architecture |
| +----------------------------------------------------------+ |
| | | |
| | Application | |
| | | | |
| | v | |
| | +------------------+ | |
| | | Cluster Endpoint | | |
| | +------------------+ | |
| | | | |
| | +--------+--------+--------+ | |
| | | | | | |
| | v v v | |
| | +----------+ +----------+ +----------+ | |
| | | Primary | | Replica | | Replica | | |
| | | Instance | | Instance | | Instance | | |
| | +----------+ +----------+ +----------+ | |
| | | | | | |
| | v v v | |
| | +------------------------------------------+ | |
| | | Cluster Volume | | |
| | | (Storage Layer) | | |
| | +------------------------------------------+ | |
| | | |
| +----------------------------------------------------------+ |
| |
| Features: |
| - MongoDB 3.6, 4.0, 5.0 compatible |
| - Fully managed |
| - Automatic storage scaling (up to 64 TB) |
| - Up to 15 read replicas |
| - High availability (Multi-AZ) |
| - Point-in-time recovery |
| |
+------------------------------------------------------------------+
DocumentDB Use Cases
+------------------------------------------------------------------+
| |
| 1. Content Management Systems |
| +----------------------------------------------------------+ |
| | - Document storage | |
| | - Flexible schema | |
| | - Rich queries | |
| +----------------------------------------------------------+ |
| |
| 2. User Profiles |
| +----------------------------------------------------------+ |
| | - Varying attributes | |
| | - Nested documents | |
| | - Fast lookups | |
| +----------------------------------------------------------+ |
| |
| 3. Catalog Management |
| +----------------------------------------------------------+ |
| | - Product catalogs | |
| | - Category hierarchies | |
| | - Search and filter | |
| +----------------------------------------------------------+ |
| |
+------------------------------------------------------------------+

Amazon Neptune
+------------------------------------------------------------------+
| |
| Purpose: Graph database for connected data |
| |
| Architecture |
| +----------------------------------------------------------+ |
| | | |
| | Graph Data Model | |
| | +----------------------------------------------------+ | |
| | | | | |
| | | (Person) --knows--> (Person) | | |
| | | | | | | |
| | | works_at works_at | | |
| | | v v | | |
| | | (Company) (Company) | | |
| | | | | |
| | +----------------------------------------------------+ | |
| | | |
| | Query Languages: | |
| | - Gremlin (Apache TinkerPop) | |
| | - SPARQL (RDF) | |
| | - openCypher (Neo4j compatible) | |
| | | |
| +----------------------------------------------------------+ |
| |
| Features: |
| - Optimized for graph queries |
| - Millisecond latency |
| - Up to 15 read replicas |
| - Multi-AZ deployment |
| - Bulk data import |
| |
+------------------------------------------------------------------+
Neptune Use Cases
+------------------------------------------------------------------+
| |
| 1. Social Networks |
| +----------------------------------------------------------+ |
| | - Friend connections | |
| | - Recommendations | |
| | - Social graphs | |
| +----------------------------------------------------------+ |
| |
| 2. Fraud Detection |
| +----------------------------------------------------------+ |
| | - Transaction patterns | |
| | - Relationship analysis | |
| | - Anomaly detection | |
| +----------------------------------------------------------+ |
| |
| 3. Knowledge Graphs |
| +----------------------------------------------------------+ |
| | - Entity relationships | |
| | - Semantic queries | |
| | - Information discovery | |
| +----------------------------------------------------------+ |
| |
| 4. Network/IT Operations |
| +----------------------------------------------------------+ |
| | - Network topology | |
| | - Impact analysis | |
| | - Root cause analysis | |
| +----------------------------------------------------------+ |
| |
+------------------------------------------------------------------+

Amazon Timestream
+------------------------------------------------------------------+
| |
| Purpose: Time-series database for IoT and analytics |
| |
| Architecture |
| +----------------------------------------------------------+ |
| | | |
| | Data Flow: | |
| | | |
| | IoT Devices | |
| | +----------+ | |
| | | Sensors | | |
| | +----------+ | |
| | | | |
| | v | |
| | Ingestion | |
| | +----------+ | |
| | | Kinesis | | |
| | | IoT Core | | |
| | +----------+ | |
| | | | |
| | v | |
| | Timestream | |
| | +------------------------------------------+ | |
| | | Memory Store (Recent Data) | | |
| | | - Fast writes | | |
| | | - Point queries | | |
| | +------------------------------------------+ | |
| | | | |
| | v (Auto-migration) | |
| | +------------------------------------------+ | |
| | | Magnetic Store (Historical Data) | | |
| | | - Cost-optimized | | |
| | | - Long-term retention | | |
| | +------------------------------------------+ | |
| | | |
| +----------------------------------------------------------+ |
| |
| Features: |
| - Serverless, auto-scaling |
| - Built-in time-series functions |
| - Automatic data tiering |
| - SQL query support |
| - Scheduled queries |
| |
+------------------------------------------------------------------+
Timestream Use Cases
+------------------------------------------------------------------+
| |
| 1. IoT Applications |
| +----------------------------------------------------------+ |
| | - Sensor data | |
| | - Device metrics | |
| | - Real-time monitoring | |
| +----------------------------------------------------------+ |
| |
| 2. Application Monitoring |
| +----------------------------------------------------------+ |
| | - Performance metrics | |
| | - Log analysis | |
| | - Error tracking | |
| +----------------------------------------------------------+ |
| |
| 3. Financial Data |
| +----------------------------------------------------------+ |
| | - Stock prices | |
| | - Trading data | |
| | - Market analysis | |
| +----------------------------------------------------------+ |
| |
+------------------------------------------------------------------+

Amazon Keyspaces
+------------------------------------------------------------------+
| |
| Purpose: Managed Apache Cassandra service |
| |
| Architecture |
| +----------------------------------------------------------+ |
| | | |
| | Cassandra-compatible API | |
| | +----------------------------------------------------+ | |
| | | | | |
| | | Application | | |
| | | | | | |
| | | v | | |
| | | +------------------+ | | |
| | | | Cassandra Driver | | | |
| | | +------------------+ | | |
| | | | | | |
| | | v | | |
| | | +------------------+ | | |
| | | | Keyspaces | | | |
| | | | (Serverless) | | | |
| | | +------------------+ | | |
| | | | | |
| | +----------------------------------------------------+ | |
| | | |
| +----------------------------------------------------------+ |
| |
| Features: |
| - Cassandra Query Language (CQL) |
| - Serverless, pay-per-request |
| - Automatic scaling |
| - Multi-AZ replication |
| - Point-in-time recovery |
| - Static columns, secondary indexes |
| |
+------------------------------------------------------------------+

Amazon QLDB (Quantum Ledger Database)
+------------------------------------------------------------------+
| |
| Purpose: Managed ledger database |
| |
| Architecture |
| +----------------------------------------------------------+ |
| | | |
| | Ledger Structure | |
| | +----------------------------------------------------+ | |
| | | | | |
| | | Block 1 | | |
| | | +----------------------------------------------+ | | |
| | | | Transaction 1 | Transaction 2 | ... | | | |
| | | +----------------------------------------------+ | | |
| | | | | | |
| | | v (Hash chain) | | |
| | | Block 2 | | |
| | | +----------------------------------------------+ | | |
| | | | Transaction 3 | Transaction 4 | ... | | | |
| | | +----------------------------------------------+ | | |
| | | | | | |
| | | v | | |
| | | Block N | | |
| | | +----------------------------------------------+ | | |
| | | | ... | | | |
| | | +----------------------------------------------+ | | |
| | | | | |
| | +----------------------------------------------------+ | |
| | | |
| +----------------------------------------------------------+ |
| |
| Features: |
| - Immutable transaction log |
| - Cryptographically verifiable |
| - SQL-like query language (PartiQL) |
| - No central trusted authority |
| - Complete audit trail |
| |
+------------------------------------------------------------------+
QLDB Use Cases
+------------------------------------------------------------------+
| |
| 1. Financial Transactions |
| +----------------------------------------------------------+ |
| | - Transaction history | |
| | - Audit trail | |
| | - Compliance records | |
| +----------------------------------------------------------+ |
| |
| 2. Supply Chain |
| +----------------------------------------------------------+ |
| | - Product tracking | |
| | - Chain of custody | |
| | - Provenance | |
| +----------------------------------------------------------+ |
| |
| 3. Healthcare |
| +----------------------------------------------------------+ |
| | - Medical records | |
| | - Prescription history | |
| | - Patient data access logs | |
| +----------------------------------------------------------+ |
| |
| 4. Legal/Regulatory |
| +----------------------------------------------------------+ |
| | - Contract history | |
| | - Compliance evidence | |
| | - Regulatory submissions | |
| +----------------------------------------------------------+ |
| |
+------------------------------------------------------------------+

# ============================================================
# DocumentDB Cluster
# ============================================================
resource "aws_docdb_cluster" "main" {
cluster_identifier = "main-docdb"
engine = "docdb"
engine_version = "5.0.0"
master_username = "admin"
master_password = var.db_password
# Storage
storage_encrypted = true
kms_key_id = aws_kms_key.docdb.arn
# Backup
backup_retention_period = 7
preferred_backup_window = "03:00-05:00"
# Network
db_subnet_group_name = aws_docdb_subnet_group.main.name
vpc_security_group_ids = [aws_security_group.docdb.id]
# Deletion protection
deletion_protection = true
skip_final_snapshot = false
final_snapshot_identifier = "main-docdb-final"
tags = {
Name = "main-docdb"
}
}
resource "aws_docdb_cluster_instance" "main" {
count = 2
identifier = "main-docdb-${count.index + 1}"
cluster_identifier = aws_docdb_cluster.main.id
instance_class = "db.r6g.large"
tags = {
Name = "main-docdb-instance-${count.index + 1}"
}
}
resource "aws_docdb_subnet_group" "main" {
name = "main-docdb-subnet"
subnet_ids = var.private_subnet_ids
tags = {
Name = "main-docdb-subnet-group"
}
}
# ============================================================
# Neptune Cluster
# ============================================================
resource "aws_neptune_cluster" "main" {
cluster_identifier = "main-neptune"
engine = "neptune"
engine_version = "1.2.0.0"
# Storage
storage_encrypted = true
kms_key_arn = aws_kms_key.neptune.arn
# Network
db_subnet_group_name = aws_neptune_subnet_group.main.name
vpc_security_group_ids = [aws_security_group.neptune.id]
# Backup
backup_retention_period = 7
preferred_backup_window = "03:00-05:00"
# IAM DB authentication
iam_database_authentication_enabled = true
tags = {
Name = "main-neptune"
}
}
resource "aws_neptune_cluster_instance" "main" {
count = 2
identifier = "main-neptune-${count.index + 1}"
cluster_identifier = aws_neptune_cluster.main.id
instance_class = "db.r5.large"
tags = {
Name = "main-neptune-instance-${count.index + 1}"
}
}
# ============================================================
# Keyspaces Keyspace
# ============================================================
resource "aws_keyspaces_keyspace" "main" {
name = "main_keyspace"
}
# ============================================================
# Keyspaces Table
# ============================================================
resource "aws_keyspaces_table" "users" {
keyspace_name = aws_keyspaces_keyspace.main.name
table_name = "users"
# Schema
column {
name = "user_id"
type = "uuid"
}
column {
name = "name"
type = "text"
}
column {
name = "email"
type = "text"
}
column {
name = "created_at"
type = "timestamp"
}
# Partition key
partition_key {
name = "user_id"
}
# Clustering key (optional)
clustering_key {
name = "created_at"
order_by = "DESC"
}
# Capacity mode
capacity {
read_capacity_units = 100
write_capacity_units = 100
}
# Or use on-demand
# capacity {
# throughput_mode = "PAY_PER_REQUEST"
# }
# Default TTL
default_time_to_live = 86400 # 24 hours
# Encryption
encryption {
type = "AWS_OWNED_KMS_KEY"
}
}

AWS Database Selection Guide
+------------------------------------------------------------------+
| |
| Use Case | Recommended Database |
| ----------------------------|----------------------------------|
| Relational data | RDS, Aurora |
| Document storage | DocumentDB, DynamoDB |
| Key-value, simple | DynamoDB |
| Graph relationships | Neptune |
| Time-series data | Timestream |
| Wide-column (Cassandra) | Keyspaces |
| Ledger/audit trail | QLDB |
| In-memory caching | ElastiCache |
| ----------------------------|----------------------------------|
| Need SQL? | RDS, Aurora, DocumentDB, QLDB |
| Need ACID? | RDS, Aurora, DocumentDB, QLDB |
| Need flexible schema? | DynamoDB, DocumentDB |
| Need complex queries? | RDS, Aurora, Neptune |
| Need low latency? | DynamoDB, ElastiCache |
| |
+------------------------------------------------------------------+

Exam Tip

  1. DocumentDB: MongoDB-compatible, document storage
  2. Neptune: Graph database, Gremlin/SPARQL/openCypher
  3. Timestream: Time-series, auto-tiering (memory to magnetic)
  4. Keyspaces: Cassandra-compatible, serverless
  5. QLDB: Ledger database, immutable, cryptographically verifiable
  6. DocumentDB: Up to 64 TB storage, 15 read replicas
  7. Neptune: Optimized for graph traversals
  8. Timestream: Built-in time-series functions
  9. Keyspaces: CQL support, pay-per-request
  10. QLDB: No blockchain overhead, centralized ledger

Chapter 26: AWS KMS - Key Management Service


Last Updated: February 2026