Skip to main content

Table

Creates and manages DynamoDB tables with support for partition and sort keys, flexible billing modes, and automatic table status monitoring.

Props

object
required
Primary partition key (hash key) configuration. Defines the main identifier for items in the table.
string
Name of the DynamoDB table.Default: ${app}-${stage}-${id}
object
Optional sort key (range key) configuration. Used to sort items with the same partition key.
'PROVISIONED' | 'PAY_PER_REQUEST'
Billing mode for the table.
  • PROVISIONED: Set read/write capacity units
  • PAY_PER_REQUEST: Pay per request pricing
number
Read capacity units when using PROVISIONED billing mode.Default: 5
number
Write capacity units when using PROVISIONED billing mode.Default: 5
Record<string, string>
Tags to apply to the table. Key-value pairs for resource organization.

Output

string
ARN of the table.Format: arn:aws:dynamodb:region:account-id:table/table-name
string
Name of the DynamoDB Table.
string
ARN of the table’s stream if enabled.Format: arn:aws:dynamodb:region:account-id:table/table-name/stream/timestamp
string
Unique identifier for the table.

Examples

Table with partition and sort key

Table with provisioned capacity

Simple table with partition key only