ladderlore
Request a guide
  • Type a service name, like S3 or IAM.

Concept

Cost-effective database types

Match the data shape and access pattern to the engine that costs least, and move cold data out of the database.

  • Key-value lookups

    Engine
    DynamoDB
    Why cheaper
    Pay per request, no servers
  • Joins and transactions

    Engine
    RDS
    Why cheaper
    Fits SQL apps
  • Large analytics

    Engine
    Redshift
    Why cheaper
    Columns compress, scan less
  • Time series

    Engine
    Time series database
    Why cheaper
    Storage tiered by age
  • Repeated reads

    Why cheaper
    Fewer database reads
Pick the engine by data shape.

1 / 2

  • Key-value lookups

    Engine
    DynamoDB
    Why cheaper
    Pay per request, no servers
  • Joins and transactions

    Engine
    RDS
    Why cheaper
    Fits SQL apps
  • Large analytics

    Engine
    Redshift
    Why cheaper
    Columns compress, scan less

2 / 2

  • Time series

    Engine
    Time series database
    Why cheaper
    Storage tiered by age
  • Repeated reads

    Why cheaper
    Fewer database reads
Pick the engine by data shape.
RDSS3AthenaExportQuery
Cold data moves to S3 and stays queryable.

What it is

A database is cheapest when its type fits the work. Key-value lookups at scale: Amazon DynamoDB. Joins and transactions: Amazon RDS or Aurora. Analytics over huge tables: Amazon Redshift, which stores data in columns, so a query reads only the columns it needs and the data compresses well. Time series data, such as metrics and sensor readings, is cheaper in a purpose-built time series database than in a general table. Choose DynamoDB when access is by key and traffic varies. Choose RDS when queries are varied and joined.

What it is

Ask the database to do less. A cache such as Amazon ElastiCache answers repeated reads for less than extra replicas cost. Read replicas move reporting off the primary. RDS Proxy pools connections, so a smaller instance can serve many short connections from Lambda or from scaled-out apps.

Move cold data out. Old rows in an RDS or DynamoDB table cost more than the same data in S3. Export or stream them to S3 in Parquet format, and query them with Amazon Athena, which charges per query. Then remove them from the hot table with TTL in DynamoDB or a delete job in RDS.

Remember

  • Key-value with varying traffic: DynamoDB. Joins and transactions: RDS or Aurora.
  • Large analytics: Redshift, which stores columns and compresses them.
  • Time series data: a purpose-built time series database.
  • Cache repeated reads before adding replicas.
  • Archive old data to S3 in Parquet and query it with Athena.

Remember

  • RDS Proxy pools connections, so a smaller instance can do.

On the exam

  • “Analytical queries over billions of rows that scan a few columns” points to Redshift, a columnar store.
  • “Sensor readings ordered by time, lowest cost” points to a time series database.
  • “Keep five years of old orders, rarely queried, lowest cost” points to exporting to S3 and querying with Athena.
  • “Lookups by key, unpredictable traffic, no server management” points to DynamoDB on-demand.