My old DynamoDB script that works:
{
"AttributeDefinitions": [
{
"AttributeName": "userId",
"AttributeType": "S"
}
],
"TableName": "DEV_Users",
"KeySchema": [
{
"AttributeName": "userId",
"KeyType": "HASH"
}
],
"ProvisionedThroughput": {
"ReadCapacityUnits": 1,
"WriteCapacityUnits": 1
}
}
My two attempts at updating this script to work for on-demand:
{
"AttributeDefinitions": [
{
"AttributeName": "userId",
"AttributeType": "S"
}
],
"TableName": "TEMP_Users",
"KeySchema": [
{
"AttributeName": "userId",
"KeyType": "HASH"
}
],
"BillingMode": "PAY_PER_REQUEST"
}
And also
{
"AttributeDefinitions": [
{
"AttributeName": "userId",
"AttributeType": "S"
}
],
"TableName": "TEMP_Users",
"KeySchema": [
{
"AttributeName": "userId",
"KeyType": "HASH"
}
],
"BillingModeSummary": [
{
"BillingMode ": "PAY_PER_REQUEST"
}
]
}
Both attempts result in:
Parameter validation failed:
Missing required parameter in input: "ProvisionedThroughput"
Unknown parameter in input: "BillingMode", must be one of: AttributeDefinitions, TableName, KeySchema, LocalSecondaryIndexes, GlobalSecondaryIndexes, ProvisionedThroughput, StreamSpecification, SSESpecification
Am I doing anything wrong? Looks like I am complying with the create-table CLI? https://docs.aws.amazon.com/cli/latest/reference/dynamodb/create-table.html