DynamoDB
Amazon DynamoDB is a fully managed, serverless, NoSQL database service optimized for low-latency and high-throughput applications.
Unlike Amazon RDS or Aurora, which provide database servers as a service, DynamoDB is a true database-as-a-service with no need to manage infrastructure.
- It stores data in key-value and document formats.
- HIPAA-compliant (but not when used with DAX).
- Data is not stored in-memory. Instead, it is stored on durable SSDs.
- Not optimized for storing large binary objects (e.g., photos, videos); best for metadata and small objects.
- Designed for low-latency operations. Storing large blobs can degrade performance.
- Point-in-Time Recovery (PITR) allows
recovery to any second in the past35 daysto meet RPOrequirements.
- DynamoDB Accelerator (DAX)
- DynamoDB Streams – "The Database Watchdog"
- Encryption with AWS-Owned Keys
- Capacity Modes - Provisioned & On-Demand
- Q1: Point-in-Time Recovery (PITR) and RPO
- Q2: Choosing the Right Capacity Mode
DynamoDB Accelerator (DAX)
- An in-memory cache designed specifically for DynamoDB.
- Provides up to 10x performance improvement for read-heavy workloads.
- Handles cache invalidation, data population, and cluster management automatically.
- API-compatible with DynamoDB – no application code changes required.
- Does not support SQL or general-purpose caching.
- Not HIPAA-compliant — cannot be used with PHI data.
DynamoDB Streams – "The Database Watchdog"
- Captures a time-ordered sequence of item-level changes in your table.
- Tracks adds, updates, and deletes (but not the full data content).
- Enables real-time event-driven architectures (e.g., notify users, sync systems, trigger Lambda functions).
Learn about kinesis streams
Encryption with AWS-Owned Keys
- DynamoDB encrypts data at rest by default — encryption cannot be disabled.
- It uses AWS-owned keys by default (rotated ~365 days), which are:
- Not visible to users
- Not included in KMS quotas
- Free to use
- Optionally, use AWS-managed or customer-managed KMS keys for added control.
Capacity Modes
Amazon DynamoDB offers TWO main capacity modes: Provisioned & On-Demand
- Provisioned Capacity Mode:
Manually set the read and write capacity unitsbased on your application's traffic needs.- You define the exact read/write capacity units your table requires.
- Ideal for predictable, steady traffic with known patterns and need fine-grained control over performance and cost.
- On-Demand Capacity Mode:
- DynamoDB automatically scales capacity based on your actual traffic needs. You pay for the capacity you use, with no need to provision or manage capacity in advance.
- Ideal for scenarios where the application traffic is unpredictable or sporadic, such as gaming applications.
Q1: Point-in-Time Recovery (PITR) and RPO
A company runs a shopping app using DynamoDB for customer info. They need to meet an RPO of 15 minutes and an RTO of 1 hour. What should the solutions architect recommend?
- A) Configure DynamoDB global tables. For RPO, point to a different AWS Region.
- B) Configure DynamoDB point-in-time recovery. For RPO, restore to the desired point in time. (Correct Answer)
- C) Export data to Amazon S3 Glacier daily. Restore from Glacier on failure.
- D) Schedule EBS snapshots every 15 minutes. Restore from snapshot.
Correct Answer: B
Q2: Choosing the Right Capacity Mode
A company wants to optimize cost for a DynamoDB table. The table sees no usage in the mornings, but unpredictable traffic in the evenings. What should a solutions architect recommend?
- A) Create a DynamoDB table in on-demand capacity mode. (Correct Answer)
- B) Create a table with a global secondary index.
- C) Use provisioned capacity with auto-scaling.
- D) Use provisioned mode with global table configuration.
Correct Answer: A