2
votes

I was using dynamo db and wanted to create a table that is using the "on demand" billing mode (PAY_PER_REQUEST), according to: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.Basics.html

I copy the command as specified on the page (as of 20-12-2018):

aws dynamodb create-table \
--table-name Music \
--attribute-definitions \
    AttributeName=Artist,AttributeType=S \
    AttributeName=SongTitle,AttributeType=S \
--key-schema \
    AttributeName=Artist,KeyType=HASH \
    AttributeName=SongTitle,KeyType=RANGE \
--billing-mode=PAY_PER_REQUEST

and it gives me:

error: argument --provisioned-throughput is required 

Edit: I have removed the = after --billing-mode but this still gives the same error.

When reading the AWS CLI reference at: https://docs.aws.amazon.com/cli/latest/reference/dynamodb/create-table.html

I read this (as of 20-12-2018) enter image description here

Is this a bug in the AWS CLI?? (I'm using Windows 10). My workaround is now to just create an on demand database via the web console, but I'd like to script creation of these databases.

My aws --version output:

aws-cli/1.15.40 Python/2.7.9 Windows/8 botocore/1.10.40

1
You need a current version of aws-cli. This feature is less than a month old.Michael - sqlbot
Ah ok, didn't realise it was this new. I ran pip install --upgrade awscli and it says I have the latest version. I suppose I'll have to wait until they update the cli.Leejjon
Something isn't right with pip, then. 1.15.40 is not very recent. 1.16.79 is the latest.Michael - sqlbot
Not sure what was wrong with pip. Overridden the installation of awscli with the executable here: docs.aws.amazon.com/cli/latest/userguide/install-windows.html Now it works, thanks. If you want the points for this answer, you can post your comment as answer and I'll upvote it.Leejjon

1 Answers