I am new to AWS, so this might be a simple question.
When I create a DynamoDB table using AWS CloudFormation template, I do not see a way to provide a name for the table. So in the end it is named something like {stackName}-{resourceName}-{randomLetters}
. However, if I create DynamoDB table manually, I have a possibility to provide a table name.
My template:
"Resources" : {
"mytable" : {
"Type" : "AWS::DynamoDB::Table",
"Properties" : {
"KeySchema" : {
"HashKeyElement": {
"AttributeName" : {"Ref" : "HashKeyElementName"},
"AttributeType" : {"Ref" : "HashKeyElementType"}
}
},
"ProvisionedThroughput" : {
"ReadCapacityUnits" : {"Ref" : "ReadCapacityUnits"},
"WriteCapacityUnits" : {"Ref" : "WriteCapacityUnits"}
}
}
}
...
}
For instance, if I create a stack called "mystack", created DynamoDB table would have a name similar to "mystack-mytable-NUEXAXXOMBXX".
You can give your table a name by using the "Tablename" property. Here's the link to the docs.
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html
"Resources" : {
"mytable" : {
"Type" : "AWS::DynamoDB::Table",
"Properties" : {
"KeySchema" : {
"HashKeyElement": {
"AttributeName" : {"Ref" : "HashKeyElementName"},
"AttributeType" : {"Ref" : "HashKeyElementType"}
}
},
"ProvisionedThroughput" : {
"ReadCapacityUnits" : {"Ref" : "ReadCapacityUnits"},
"WriteCapacityUnits" : {"Ref" : "WriteCapacityUnits"}
},
"TableName": "MyDynamoDBTableName"
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With