Lesson content
Read, practise, then check your understanding
Databases: RDS and DynamoDB
Amazon RDS manages relational engines, backups, patching workflows, monitoring, and availability options. DynamoDB is a serverless key-value and document database designed around known access patterns and partitioned scale.
Core ideas
- RDS Multi-AZ improves availability through a standby; it is not primarily a read-scaling feature.
- Read replicas can offload eligible reads and have asynchronous replication behavior.
- DynamoDB requires a partition key and optionally a sort key; key design determines efficient queries and distribution.
- On-demand and provisioned DynamoDB capacity models fit different traffic predictability.
Design and operating model
Begin with data relationships, transactions, query shapes, latency, scale, and operational requirements. Choose RDS when relational integrity and SQL access dominate. Choose DynamoDB for predictable key-based access at high scale. Model hot keys, failure modes, backups, restore, encryption, and cross-region needs before production.
Example
aws rds describe-db-instances \
--query 'DBInstances[].[DBInstanceIdentifier,Engine,MultiAZ]'
aws dynamodb get-item \
--table-name Orders \
--key '{"pk":{"S":"ORDER#1042"},"sk":{"S":"SUMMARY"}}' \
--consistent-read
Run examples in a disposable training account and replace Regions, identifiers, policies, resource sizes, and names with reviewed values. Verify commands with the current AWS CLI and service documentation before production use.
Production guidance
- Keep databases private and connect through controlled application identities and network paths.
- Enable automated backups and rehearse point-in-time recovery into an isolated environment.
- For DynamoDB, design keys from access patterns and monitor throttling, consumed capacity, and skew.
The chapter quiz follows the lesson and checks both service vocabulary and architecture decisions.
Knowledge check
Answer every question correctly to complete this chapter.
0 of 10 checks passed
Your progress is saved on this device.