| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Creates an Amazon DynamoDB table.
Note
This resource does not support local secondary indexes.
{
"Type" : "AWS::DynamoDB::Table",
"Properties" : {
"KeySchema" : { DynamoDB Primary Key },
"ProvisionedThroughput" : { DynamoDB Provisioned Throughput }
}
}
The primary key structure for the table, consisting of a required
HashKeyElement and an optional RangeKeyElement,
required only for composite primary keys. For more information about primary
keys, see DynamoDB Primary Key.
Required: Yes
Type: DynamoDB Primary Key
Update requires: replacement
New throughput for the specified table, consisting of values for ReadCapacityUnits and WriteCapacityUnits. For more information about the contents of a Provisioned Throughput structure, see DynamoDB Provisioned Throughput.
Required: Yes
Type: DynamoDB Provisioned Throughput
Update requires: replacement
When the logical ID of this resource is provided to the Ref intrinsic
function, it returns the resource name. For example:
{ "Ref": "MyResource" }For the resource with the logical ID "MyResource", Ref will return the AWS resource
name.
For more information about using the Ref function, see Ref.
Example Simple DynamoDB Template
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Resources" : {
"myDynamoDBTable" : {
"Type" : "AWS::DynamoDB::Table",
"Properties" : {
"KeySchema" : {
"HashKeyElement": {
"AttributeName" : "AttributeName1",
"AttributeType" : "S"
},
"RangeKeyElement" : {
"AttributeName" : "AttributeName2",
"AttributeType" : "N"
}
},
"ProvisionedThroughput" : {
"ReadCapacityUnits" : "5",
"WriteCapacityUnits" : "10"
}
}
}
}
}