{
"Description": "AWS CloudFormation Sample Template: This template demonstrates the creation of a DynamoDB table.",
"Outputs": {
"TableName": {
"Description": "Table name of the newly create DynamoDB table",
"Value": {
"Ref": "myDynamoDBTable"
}
}
},
"Parameters": {
"HaskKeyElementName": {
"AllowedPattern": "[a-zA-Z0-9]*",
"ConstraintDescription": "must contain only alphanumberic characters",
"Description": "HashType PrimaryKey Name",
"MaxLength": "2048",
"MinLength": "1",
"Type": "String"
},
"HaskKeyElementType": {
"AllowedPattern": "[S|N]",
"ConstraintDescription": "must be either S or N",
"Default": "S",
"Description": "HashType PrimaryKey Type",
"MaxLength": "1",
"MinLength": "1",
"Type": "String"
},
"ReadCapacityUnits": {
"ConstraintDescription": "should be between 5 and 10000",
"Default": "5",
"Description": "Provisioned read throughput",
"MaxValue": "10000",
"MinValue": "5",
"Type": "Number"
},
"WriteCapacityUnits": {
"ConstraintDescription": "should be between 5 and 10000",
"Default": "10",
"Description": "Provisioned write throughput",
"MaxValue": "10000",
"MinValue": "5",
"Type": "Number"
}
},
"Resources": {
"myDynamoDBTable": {
"Properties": {
"AttributeDefinitions": [
{
"AttributeName": {
"Ref": "HaskKeyElementName"
},
"AttributeType": {
"Ref": "HaskKeyElementType"
}
}
],
"KeySchema": [
{
"AttributeName": {
"Ref": "HaskKeyElementName"
},
"KeyType": "HASH"
}
],
"ProvisionedThroughput": {
"ReadCapacityUnits": {
"Ref": "ReadCapacityUnits"
},
"WriteCapacityUnits": {
"Ref": "WriteCapacityUnits"
}
}
},
"Type": "AWS::DynamoDB::Table"
}
}
}