If I want the key schema to hash+renge, how do I write it correctly?
1 validation error detected: Value 'RENGE' at'keySchema.
2.member.keyType'failed to satify constraint: Member must satify enum value set: [HASH,RANGE] (Service: AmazonDynamoDBv2;
Status Code: 400; Error Code: ValidationException; Request ID: L6GDTPVEFBAVKUOA4DR2LM9SHBV4KQNSO5AEMVJF66Q9ASUAAJG)
"DynamoDBTable": {
"Type": "AWS::DynamoDB::Table",
"Properties": {
"TableName": {"Ref": "DynamoDBTableName",
"BillingMode": "PAY_PER_REQUEST",
AttributeDefinitions: [
{
"AttributeName": "Id",
"AttributeType": "S"
},
{
"AttributeName": "Time",
"AttributeType": "N"
}
],
"KeySchema": [
{
"AttributeName": "Id",
"KeyType": "HASH"
},
{
"AttributeName": "Time",
"KeyType": "RENGE"
}
],
"Tags": [
{
"Key": "Name",
"Value": {"Ref": "DynamoDBTableName"}
}
]
}
},
It was RANGE, not RENGE, because of a spelling error.
"DynamoDBTable": {
"Type": "AWS::DynamoDB::Table",
"Properties": {
"TableName": {"Ref": "DynamoDBTableName",
"BillingMode": "PAY_PER_REQUEST",
AttributeDefinitions: [
{
"AttributeName": "Id",
"AttributeType": "S"
},
{
"AttributeName": "Time",
"AttributeType": "N"
}
],
"KeySchema": [
{
"AttributeName": "Id",
"KeyType": "HASH"
},
{
"AttributeName": "Time",
"KeyType": "Range"
}
],
"Tags": [
{
"Key": "Name",
"Value": {"Ref": "DynamoDBTableName"}
}
]
}
},
© 2024 OneMinuteCode. All rights reserved.