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.

  1. It stores data in key-value and document formats.
  2. HIPAA-compliant (but not when used with DAX).
  3. Data is not stored in-memory. Instead, it is stored on durable SSDs.
  4. Not optimized for storing large binary objects (e.g., photos, videos); best for metadata and small objects.
  5. Designed for low-latency operations. Storing large blobs can degrade performance.
  6. Point-in-Time Recovery (PITR) allows recovery to any second in the past 35 days to meet RPO requirements.

DynamoDB Accelerator (DAX)

  1. An in-memory cache designed specifically for DynamoDB.
  2. Provides up to 10x performance improvement for read-heavy workloads.
  3. Handles cache invalidation, data population, and cluster management automatically.
  4. API-compatible with DynamoDB – no application code changes required.
  5. Does not support SQL or general-purpose caching.
  6. Not HIPAA-compliant — cannot be used with PHI data.

DynamoDB Streams – "The Database Watchdog"

  1. Captures a time-ordered sequence of item-level changes in your table.
  2. Tracks adds, updates, and deletes (but not the full data content).
  3. Enables real-time event-driven architectures (e.g., notify users, sync systems, trigger Lambda functions).

Learn about kinesis streams

Encryption with AWS-Owned Keys

  1. DynamoDB encrypts data at rest by default — encryption cannot be disabled.
  2. It uses AWS-owned keys by default (rotated ~365 days), which are:
    • Not visible to users
    • Not included in KMS quotas
    • Free to use
  3. Optionally, use AWS-managed or customer-managed KMS keys for added control.

Capacity Modes

Amazon DynamoDB offers TWO main capacity modes: Provisioned & On-Demand

  1. Provisioned Capacity Mode:
    1. Manually set the read and write capacity units based on your application's traffic needs.
    2. You define the exact read/write capacity units your table requires.
    3. Ideal for predictable, steady traffic with known patterns and need fine-grained control over performance and cost.
  2. On-Demand Capacity Mode:
    1. 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.
    2. 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?

  1. A) Configure DynamoDB global tables. For RPO, point to a different AWS Region.
  2. B) Configure DynamoDB point-in-time recovery. For RPO, restore to the desired point in time. (Correct Answer)
  3. C) Export data to Amazon S3 Glacier daily. Restore from Glacier on failure.
  4. 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?

  1. A) Create a DynamoDB table in on-demand capacity mode. (Correct Answer)
  2. B) Create a table with a global secondary index.
  3. C) Use provisioned capacity with auto-scaling.
  4. D) Use provisioned mode with global table configuration.

Correct Answer: A