AWS::DynamoDB::TableThe AWS::DynamoDB::Table resource creates a DDB table. For more information, see [CreateTable](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_CreateTable.html) in the *API Reference*. You should be aware of the following behaviors when working with DDB tables: + CFNlong typically creates DDB tables in parallel. However, if your template includes multiple DDB tables with indexes, you must declare dependencies so that the tables are created sequentially. DDBlong limits the number of tables with secondary indexes that are in the creating state. If you create multiple tables with indexes at the same time, DDB returns an error and the stack operation fails. For an example, see [DynamoDB Table with a DependsOn Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#aws-resource-dynamodb-table--examples--DynamoDB_Table_with_a_DependsOn_Attribute). Our guidance is to use the latest schema documented for your CFNlong templates. This schema supports the provisioning of all table settings below. When using this schema in your CFNlong templates, please ensure that your Identity and Access Management (IAM) policies are updated with appropriate permissions to allow for the authorization of these setting changes.
20 configurable properties. 1 required. Click a row to see details.
| Property | Type | Flags |
|---|---|---|
KeySchema | Array<KeySchema> | object | Required |
AttributeDefinitions | Array<AttributeDefinition> | |
BillingMode | string | |
ContributorInsightsSpecification | ContributorInsightsSpecification | |
DeletionProtectionEnabled | boolean | |
GlobalSecondaryIndexes | Array<GlobalSecondaryIndex> | |
ImportSourceSpecification | ImportSourceSpecification | Create-onlyWrite-only |
KinesisStreamSpecification | KinesisStreamSpecification | |
LocalSecondaryIndexes | Array<LocalSecondaryIndex> | |
OnDemandThroughput | OnDemandThroughput | |
PointInTimeRecoverySpecification | PointInTimeRecoverySpecification | |
ProvisionedThroughput | ProvisionedThroughput | |
ResourcePolicy | ResourcePolicy | |
SSESpecification | SSESpecification | |
StreamSpecification | StreamSpecification | |
TableClass | string | |
TableName | string | Create-only |
Tags | Array<Tag> | |
TimeToLiveSpecification | TimeToLiveSpecification | |
WarmThroughput | WarmThroughput |
Values returned after the resource is created. Access these with Fn::GetAtt.
| Attribute | Type | Description |
|---|---|---|
Arn | string | - |
StreamArn | string | - |
A minimal template with required properties and common optional ones.
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::DynamoDB::Table
Resources:
MyResource:
Type: AWS::DynamoDB::Table
Properties:
KeySchema: "value"
Tags:
- Key: Environment
Value: ProductionPermissions CloudFormation needs in your IAM role to manage this resource.
dynamodb:DescribeTabledynamodb:DescribeContinuousBackupsdynamodb:DescribeContributorInsightsdynamodb:DescribeKinesisStreamingDestinationdynamodb:ListTagsOfResourcedynamodb:GetResourcePolicydynamodb:DescribeTimeToLivedynamodb:CreateTabledynamodb:DescribeImportdynamodb:DescribeTabledynamodb:DescribeTimeToLivedynamodb:UpdateTimeToLivedynamodb:UpdateContributorInsightsdynamodb:UpdateContinuousBackupsdynamodb:DescribeContinuousBackupsdynamodb:DescribeContributorInsightsdynamodb:EnableKinesisStreamingDestinationdynamodb:DisableKinesisStreamingDestinationdynamodb:DescribeKinesisStreamingDestinationdynamodb:ImportTabledynamodb:ListTagsOfResourcedynamodb:TagResourcedynamodb:UpdateTabledynamodb:GetResourcePolicydynamodb:PutResourcePolicydynamodb:CreateTableReplicadynamodb:Scandynamodb:Querydynamodb:UpdateItemdynamodb:PutItemdynamodb:GetItemdynamodb:DeleteItemdynamodb:BatchWriteItemdynamodb:AssociateTableReplicakinesis:DescribeStreamkinesis:PutRecordsiam:CreateServiceLinkedRolekms:CreateGrantkms:Decryptkms:DescribeKeykms:ListAliaseskms:Encryptkms:RevokeGrantlogs:CreateLogGrouplogs:CreateLogStreamlogs:DescribeLogGroupslogs:DescribeLogStreamslogs:PutLogEventslogs:PutRetentionPolicys3:GetObjects3:GetObjectMetadatas3:ListBucketdynamodb:UpdateTabledynamodb:DescribeTabledynamodb:DescribeTimeToLivedynamodb:UpdateTimeToLivedynamodb:UpdateContinuousBackupsdynamodb:UpdateContributorInsightsdynamodb:UpdateKinesisStreamingDestinationdynamodb:DescribeContinuousBackupsdynamodb:DescribeKinesisStreamingDestinationdynamodb:ListTagsOfResourcedynamodb:TagResourcedynamodb:UntagResourcedynamodb:DescribeContributorInsightsdynamodb:EnableKinesisStreamingDestinationdynamodb:DisableKinesisStreamingDestinationdynamodb:GetResourcePolicydynamodb:PutResourcePolicydynamodb:DeleteResourcePolicydynamodb:CreateTabledynamodb:CreateTableReplicadynamodb:Scandynamodb:Querydynamodb:UpdateItemdynamodb:PutItemdynamodb:GetItemdynamodb:DeleteItemdynamodb:BatchWriteItemdynamodb:AssociateTableReplicakinesis:DescribeStreamkinesis:PutRecordsiam:CreateServiceLinkedRolekms:CreateGrantkms:DescribeKeykms:ListAliaseskms:RevokeGrantdynamodb:ListTablesdynamodb:DeleteTabledynamodb:DescribeTableEverything you need to know about DynamoDB on one page. HD quality, print-friendly.
Download Free InfographicTableNameThese properties cannot be changed after the resource is created. Updating them triggers a replacement.
TableNameImportSourceSpecification