# terraform-aws-modules/terraform-aws-dynamodb-table architecture

> Architecture diagram of the GitHub repository terraform-aws-modules/terraform-aws-dynamodb-table, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/terraform-aws-modules/terraform-aws-dynamodb-table
- Repository: https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table

## Overview

This repository is a Terraform module for provisioning AWS DynamoDB tables. The main workflow is a user supplying table configuration, which the module applies to DynamoDB; optional autoscaling adds Application Auto Scaling targets and policies. The README also documents resource policies, wrapper modules, and examples for global tables and S3 imports. Source excerpts were not provided, so edges rely on README statements; implementation details beyond those documented are omitted.

Main entry points: [`main.tf`](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/main.tf) (DynamoDB module), [`autoscaling.tf`](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/autoscaling.tf) (Autoscaling resources), [`wrappers/main.tf`](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/wrappers/main.tf) (Terragrunt wrappers), [`examples/basic/main.tf`](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/examples/basic/main.tf) (Basic example)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_table["Table provisioning"]
  node_module["DynamoDB module<br/>[main.tf]"]
  node_table_resource[("DynamoDB tables<br/>[main.tf]")]
  node_resource_policy["Resource policy<br/>[main.tf]"]
end

subgraph group_scaling["Autoscaling"]
  node_autoscaling["Autoscaling resources<br/>[autoscaling.tf]"]
end

subgraph group_wrappers["Module wrappers"]
  node_wrapper["Terragrunt wrappers<br/>[main.tf]"]
end

subgraph group_examples["Usage examples"]
  node_basic_example["Basic example<br/>[main.tf]"]
  node_autoscaling_example["Autoscaling example<br/>[main.tf]"]
  node_global_tables["Global tables example<br/>[main.tf]"]
  node_s3_import["S3 import example<br/>[main.tf]"]
end

node_user(("Terraform user"))
node_aws_dynamodb[("AWS DynamoDB")]
node_aws_autoscaling["AWS Application Auto Scaling"]

node_user -->|"configures"| node_module
node_module -->|"defines"| node_table_resource
node_module -->|"defines"| node_resource_policy
node_table_resource -->|"provisions"| node_aws_dynamodb
node_module -->|"configures"| node_autoscaling
node_autoscaling -->|"provisions"| node_aws_autoscaling
node_user -->|"uses"| node_wrapper
node_user -->|"configures"| node_basic_example
node_user -->|"configures"| node_autoscaling_example
node_user -->|"configures"| node_global_tables
node_user -->|"configures"| node_s3_import

click node_module "https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/main.tf"
click node_table_resource "https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/main.tf"
click node_resource_policy "https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/main.tf"
click node_autoscaling "https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/autoscaling.tf"
click node_wrapper "https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/wrappers/main.tf"
click node_basic_example "https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/examples/basic/main.tf"
click node_autoscaling_example "https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/examples/autoscaling/main.tf"
click node_global_tables "https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/examples/global-tables/main.tf"
click node_s3_import "https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/examples/s3-import/main.tf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_module,node_table_resource,node_resource_policy,node_user toneBlue
class node_autoscaling,node_aws_dynamodb toneAmber
class node_wrapper toneMint
class node_basic_example,node_autoscaling_example,node_global_tables,node_s3_import toneRose
class node_aws_autoscaling toneIndigo
```

## Components

### Table provisioning

- [DynamoDB module](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/main.tf): `main.tf`
- [DynamoDB tables](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/main.tf): `main.tf`
- [Resource policy](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/main.tf): `main.tf`

### Autoscaling

- [Autoscaling resources](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/autoscaling.tf): `autoscaling.tf`

### Module wrappers

- [Terragrunt wrappers](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/wrappers/main.tf): `wrappers/main.tf`

### Usage examples

- [Basic example](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/examples/basic/main.tf): `examples/basic/main.tf`
- [Autoscaling example](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/examples/autoscaling/main.tf): `examples/autoscaling/main.tf`
- [Global tables example](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/examples/global-tables/main.tf): `examples/global-tables/main.tf`
- [S3 import example](https://github.com/terraform-aws-modules/terraform-aws-dynamodb-table/blob/master/examples/s3-import/main.tf): `examples/s3-import/main.tf`

### Other components

- **Terraform user**
- **AWS DynamoDB**
- **AWS Application Auto Scaling**

## Connections

- Terraform user → DynamoDB module: configures (evidence: `README.md`)
- DynamoDB module → DynamoDB tables: defines (evidence: `README.md`)
- DynamoDB module → Resource policy: defines (evidence: `README.md`)
- DynamoDB tables → AWS DynamoDB: provisions (evidence: `README.md`)
- DynamoDB module → Autoscaling resources: configures (evidence: `README.md`)
- Autoscaling resources → AWS Application Auto Scaling: provisions (evidence: `README.md`)
- Terraform user → Terragrunt wrappers: uses (evidence: `README.md`)
- Terraform user → Basic example: configures (evidence: `README.md`)
- Terraform user → Autoscaling example: configures (evidence: `README.md`)
- Terraform user → Global tables example: configures (evidence: `README.md`)
- Terraform user → S3 import example: configures (evidence: `README.md`)
