Mak*_*kin 4 amazon-web-services amazon-dynamodb
我是AWS的新手,所以这可能是一个简单的问题.
当我使用AWS CloudFormation模板创建DynamoDB表时,我没有看到为表提供名称的方法.所以最后它被命名为{stackName}-{resourceName}-{randomLetters}.但是,如果我手动创建DynamoDB表,我有可能提供表名.
我的模板:
"Resources" : {
"mytable" : {
"Type" : "AWS::DynamoDB::Table",
"Properties" : {
"KeySchema" : {
"HashKeyElement": {
"AttributeName" : {"Ref" : "HashKeyElementName"},
"AttributeType" : {"Ref" : "HashKeyElementType"}
}
},
"ProvisionedThroughput" : {
"ReadCapacityUnits" : {"Ref" : "ReadCapacityUnits"},
"WriteCapacityUnits" : {"Ref" : "WriteCapacityUnits"}
}
}
}
...
}
Run Code Online (Sandbox Code Playgroud)
例如,如果我创建一个名为"mystack"的堆栈,则创建的DynamoDB表将具有类似于"mystack-mytable-NUEXAXXOMBXX"的名称.
Han*_*nny 20
您可以使用"Tablename"属性为表指定名称.这是文档的链接.
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"
}
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4432 次 |
| 最近记录: |