Component 08

DynamoDB Global Table

Store application data with an optional cross-region replica.

Status

Available module

Deployment scope

Primary + DR ready

Example version constraint

~> 1.0

Review published versions ↗

What it deploys

The resources this component creates, and how they connect. Drag to pan, scroll to zoom.

Usage example

Inputs in, outputs out. Illustrative wiring, not a standalone deployment.

Supply AWS provider aliases and choose keys and indexes for your access patterns. Adopting an existing table requires a reviewed import or migration plan. Configure provider requirements and credentials in your root module; check the documentation for all required inputs and version changes.

main.tf
module "transactions_table" {
  source = "pomo-studio/dynamodb-global-table/aws"
  version = "~> 1.0"

  name       = "my-app-transactions"
  hash_key   = "tenant_id"
  attributes = [{ name = "tenant_id", type = "S" }]
  enable_dr  = true
}

Key inputs

  • name
  • hash_key
  • attributes
  • global_secondary_indexes
  • enable_dr
  • enable_pitr

Useful outputs

  • table_name_primary
  • table_arn_primary
  • table_stream_arn_primary
  • replica_enabled

What you get

01

Primary + replica

Create a regional table with an optional cross-region replica.

02

Schema flexibility

Define hash/range keys and optional GSIs for your access patterns.

03

Data protection

Use PITR, TTL, deletion protection, and SSE without custom resources.

  • Materialized View

    Precompute a read-optimized projection so queries stay fast without recomputing on every request.

  • CQRS

    Separate the write model from the read model so each can be shaped for its own job.

Built with

  • DynamoDB
  • Global Tables
  • KMS
  • PITR
  • Terraform