1
我有一個需要複製到不同環境的DynamoDB表。管理表格的最佳方法是使用CloudFormation模板,以便腳本可以基於模板創建表格。鑑於表已存在,我想知道是否有可能爲現有表生成e模板,有什麼想法?找不到太多的谷歌......從DynamoDB表生成雲形成模板
模板會是這個樣子:
"Resources": {
"CustomerTable": {
"Type" : "AWS::DynamoDB::Table",
"Properties" : {
"KeySchema": [
{
"AttributeName": "customerId",
"KeyType": "HASH"
}
],
"AttributeDefinitions": [
{
"AttributeName": "customerId",
"AttributeType": "N"
}
],
"ProvisionedThroughput" : {
"ReadCapacityUnits" : { "Ref": "CustomerReadCapacity" },
"WriteCapacityUnits" : { "Ref": "CustomerWriteCapacity" }
},
"TableName" : "customer"
}
}
}
太棒了,讓我試試吧! – Bodao
花了我一段時間,但它做了詭計,感謝您的幫助! – Bodao