Unknown parameter in input: "BillingMode"

0

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

feita há 5 anos469 visualizações
3 Respostas
0
Resposta aceita

I believe you might be using an older version of aws cli and hence its not able to recognize recently added parameter 'BillingMode'. Can you update aws cli using following command 'sudo pip3 install --upgrade awscli' to latest version and then retry.

AWS
respondido há 5 anos
0

Thank you - this was the problem.

respondido há 5 anos
0

I am glad issue is resolved.

AWS
respondido há 5 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas