Managed (serverless) services reduce your operational responsibility for availability and durability. When you manage compute (EC2), you also accept more reliability tasks (patching, failover automation, backups). Use managed services where appropriate to shift operational burden to AWS.
Relational databases (SQL) are transactional and consistent by design. We begin with Amazon RDS (Relational Database Service — excluding Aurora in the Aurora section).

RDS: Read replicas, Multi‑AZ, and failover patterns
One effective reliability pattern is to add read replicas and route read-only traffic to them while keeping writes on the primary. Use separate DNS endpoints for clarity — for example:read.myapplication.companyname.com→ reader endpointsreadwrite.myapplication.companyname.com→ primary/write endpoint

- Create a read replica of the production primary.
- Upgrade the replica to the target engine/version.
- Promote the upgraded replica to standalone master.
- Repoint application read/write traffic to the new primary.


- Standard RDS Multi‑AZ: synchronous replication to a standby; standby usually not readable; failover is automatic and transparent to the RDS endpoint.
- Aurora: storage-level replication that supports readable replicas and faster failovers; different behaviour from standard RDS.



RDS Proxy and improved resiliency
RDS Proxy sits between applications and databases to pool and reuse connections, reduce connection storms, and keep clients connected during failover. It also integrates with AWS Secrets Manager for credential rotation and supports read-only and read-write endpoints for supported engines. Operational benefits:- Fewer open connections on DB during spikes
- Smoother failovers with client connection continuity
- Centralized credential rotation via Secrets Manager


Observability and operational tooling for RDS
- Automated snapshots and point-in-time recovery (PITR) are essential for durability.
- Use Enhanced Monitoring when you need OS-level metrics (one-second granularity available) in addition to standard CloudWatch metrics.
- Use Performance Insights for SQL-level diagnostics: top queries, wait events, and tuning opportunities.
- Export database logs (error, audit) to CloudWatch Logs for retention, alerting, and metric extraction.
- Use RDS Event Notifications forwarded to SNS/EventBridge for automated incident workflows.






Amazon Aurora
Aurora is a cloud-native engine compatible with PostgreSQL or MySQL. It separates compute and storage: the storage layer is distributed across AZs (typically 6 copies) and continuously backs up to S3. This design enables lightweight compute replicas and fast failovers.

- Multi‑master Aurora: multiple writer instances across AZs for continuous write availability.
- Aurora Serverless: autoscaling compute with Aurora Capacity Units (ACUs) — configure min/max ACUs (min cannot be zero).
- Pre-warming replicas;
- Blue/green deployments (promote green cluster after testing);
- Provisioned clusters + RDS Proxy for connection management.


- Pre-warm clusters with periodic dummy queries,
- Use provisioned clusters with replicas for predictable peaks,
- Trigger ACU scaling programmatically (Lambda + CloudWatch alarms),
- Use RDS Proxy to manage client connection spikes.

RDS Proxy (revisited)
RDS Proxy reduces DB connection overhead and improves failover behavior by decoupling connections from application clients. It supports Secrets Manager integration for credential rotation.
Amazon Redshift (data warehouse)
Redshift supports provisioned clusters (leader + compute nodes) and a serverless option. For reliability:- Use multiple compute nodes (within a region) and automated cross-region snapshots for DR.
- Redshift Serverless auto-scales compute in response to workload peaks.
- For global replication or DR, use cross-region snapshots or data archiving to S3.



NoSQL and Serverless Datastores
DynamoDB
DynamoDB is a fully managed, serverless NoSQL datastore with automatic replication across AZs. Key reliability patterns:- Use on‑demand capacity for unpredictable spikes or provisioned capacity + Auto Scaling for predictable workloads.
- Use Global Tables for multi-region, multi-master asynchronous replication.
- Buffer ingest (Kinesis, SQS) to absorb spikes and ensure reliability.




DAX (DynamoDB Accelerator)
DAX is an in-memory caching layer for DynamoDB that reduces read latency for eventually consistent reads. It is managed and replicates across nodes for fault tolerance.
OpenSearch (search & analytics)
OpenSearch uses shards and replica shards for durability and scaling. If a primary shard or node fails, reads route to replicas and replicas can be promoted to primary. Ensure:- Adequate replica counts,
- Snapshot indices to S3 regularly,
- Monitor cluster health and shard allocation.



Open-source-based and In‑memory Stores
ElastiCache (Redis & Memcached)
ElastiCache adds a caching layer to reduce DB load and improve response times:- Memcached: simple sharded cache, no built-in replication.
- Redis: replication, persistence options, replication groups with automatic failover.




MemoryDB for Redis
MemoryDB provides an in-memory durable Redis-compatible store with synchronous replication across AZs and multi-AZ failover for stronger durability than standard caching solutions.
DocumentDB, Keyspaces, Neptune, and other specialized datastores
DocumentDB (MongoDB-compatible)
DocumentDB uses a distributed storage volume (similar to Aurora), replicates across AZs, and backs up to S3. It supports reader/cluster endpoints and global clusters for cross-region DR.
Amazon Keyspaces (Cassandra-compatible)
Keyspaces is a managed, serverless Cassandra-compatible datastore with partitioning and replication across AZs. It handles provisioning, patching, and failure recovery and exposes TLS+CQL endpoints.


Amazon Neptune (graph DB)
Neptune is a managed graph database with clustered storage across AZs. Deploy replicas across AZs for HA and use the cluster endpoint for client connections. Use S3 bulk load for large imports and monitor cluster health.
Immutable and Time-series Databases
Amazon QLDB (Quantum Ledger Database)
QLDB is an append-only ledger with a verifiable history of changes. It offers high durability and AZ replication, but because it is append-only, design ingestion with buffering (Kinesis, SQS) or retries to handle transient failures and to decouple producers.
Amazon Timestream
Timestream is purpose-built for time-series data (IoT, telemetry). It replicates across AZs and is optimized for high-ingest workloads. Best practices:- Implement client-side retries with exponential backoff,
- Buffer ingest using Kinesis or IoT Core,
- Monitor ingest rates, query durations, and memory usage.


Summary and recommended patterns
This lesson covered AWS datastores and reliability strategies across relational, data warehouse, NoSQL, caching, search, document, graph, immutable, and time-series stores. Repeatable patterns include:- Prefer managed/serverless services to shift operational burden to AWS when possible.
- Use Multi‑AZ for synchronous replication and automatic failover (RDS engines, MemoryDB, Neptune).
- Use read replicas for read scaling and use promotion workflows or blue/green for upgrades.
- Use RDS Proxy or caching layers (DAX, ElastiCache) to decouple connection management and reduce failovers.
- Implement automated backups, snapshots, cross‑region replication or global tables for DR.
- Buffer and queue ingestion (Kinesis, SQS) to prevent cascading failures and enable retries.
- Instrument everything: CloudWatch, Enhanced Monitoring, Performance Insights, CloudTrail, and export logs to CloudWatch Logs/S3.
Be aware of replication models and lag: asynchronous replicas can lag and are not a substitute for synchronous Multi‑AZ for critical writes. Test failover and recovery procedures regularly.
- Amazon RDS Documentation
- Amazon Aurora Documentation
- Amazon DynamoDB Developer Guide
- Amazon Redshift Documentation
- Amazon ElastiCache Documentation
- Amazon OpenSearch Service Documentation
- Amazon QLDB Documentation
- Amazon Timestream Documentation