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

질문됨 5년 전436회 조회
3개 답변
0
수락된 답변

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
답변함 5년 전
0

Thank you - this was the problem.

답변함 5년 전
0

I am glad issue is resolved.

AWS
답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠