3

i have been trying to create a dynamo db table using the following json(testbootstraptable.json) file:

{
        "AttributeDefinitions": [
            {
                "AttributeName": "test1",
                "AttributeType": "S"
            },
            {
                "AttributeName": "test2",
                "AttributeType": "S"
            }
        ],
        "TableName": "BOOTSTRAP_TEST_TBL",
        "KeySchema": [
            {
                "AttributeName": "test1",
                "KeyType": "HASH"
            },
            {
                "AttributeName": "test2",
                "KeyType": "RANGE"
            }
        ],
        "ProvisionedThroughput": {
            "NumberOfDecreasesToday": 0,
            "ReadCapacityUnits": 35,
            "WriteCapacityUnits": 35
        }
}

I have tried multiple times with different variations based on google search but keep getting the following error:

Error parsing parameter 'cli-input-json': Invalid JSON: Expecting value: line 1 column 1 (char 0)
JSON received: testbootstraptable.json

AWS Command:

$ aws dynamodb create-table --cli-input-json testbootstraptable.json --region us-west-2

1 Answer 1

13

Add "file://" to testbootstraptable.json

aws dynamodb create-table --cli-input-json file://testbootstraptable.json --region us-west-2

Also, delete the following line as it is not correct: "NumberOfDecreasesToday": 0,

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.