0
作成したいダイナモdbテーブル用のクラウドフォーメーションテンプレートを作成しようとしています。私は、テーブル内の次のフィールドが必要です:guid、uniqueid、サービス。配列クラウドフォーメーションテンプレートとしての一意のキーAWS
どのようにGUIDとサービスを配列にする主キーにすることができますか。
は、ここで私は
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"UsersUniqueIdsTableName": {
"Description": "Table name to use",
"Type": "String",
"Default": "test-db-user-unique-ids"
},
"UniqueIdsReadCapacityUnits": {
"Description": "Provisioned read throughput",
"Type": "Number",
"Default": "1",
"MinValue": "1",
"MaxValue": "10000",
"ConstraintDescription": "must be between 1 and 10000"
},
"UniqueIdsWriteCapacityUnits": {
"Description": "Provisioned write throughput",
"Type": "Number",
"Default": "1",
"MinValue": "1",
"MaxValue": "10000",
"ConstraintDescription": "must be between 1 and 10000"
}
},
"Resources": {
"marvelUsers": {
"Type": "AWS::DynamoDB::Table",
"Properties": {
"TableName": {
"Ref": "UsersUniqueIdsTableName"
},
"AttributeDefinitions": [
{
"AttributeName": "guid",
"AttributeType": "S"
},
{
"AttributeName": "service",
"AttributeType": "S"
},
{
"AttributeName": "uniqueid",
"AttributeType": "S"
}
],
"KeySchema": [
{
"AttributeName": "guid",
"KeyType": "HASH"
}
],
"GlobalSecondaryIndexes": [
{
"IndexName": "unique",
"KeySchema": [
{
"AttributeName": "reminder_day",
"KeyType": "HASH"
}
],
"Projection": {
"ProjectionType": "ALL"
},
"ProvisionedThroughput": {
"ReadCapacityUnits": {
"Ref": "UniqueIdsReadCapacityUnits"
},
"WriteCapacityUnits": {
"Ref": "UniqueIdsWriteCapacityUnits"
}
}
}
],
"ProvisionedThroughput": {
"ReadCapacityUnits": {
"Ref": "UniqueIdsReadCapacityUnits"
},
"WriteCapacityUnits": {
"Ref": "UniqueIdsUsersWriteCapacityUnits"
}
}
}
}
}
}