使用--billing-mode = PAY_PER_REQUEST创建dynamodb表失败

时间:2018-12-20 08:56:59

标签: amazon-web-services amazon-dynamodb

我正在使用dynamo db,并想创建一个表,该表使用“按需”计费方式(PAY_PER_REQUEST),根据: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.Basics.html

我复制页面上指定的命令(截至2018年12月20日):

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

它给了我

error: argument --provisioned-throughput is required 

编辑:我在--billing-mode之后删除了=,但这仍然给出相同的错误。

在以下位置阅读AWS CLI参考时: https://docs.aws.amazon.com/cli/latest/reference/dynamodb/create-table.html

我读了此内容(截至2018年12月20日) enter image description here

这是AWS CLI中的错误吗? (我正在使用Windows 10)。现在,我的解决方法是仅通过Web控制台创建一个随需应变的数据库,但是我想用脚本编写这些数据库的创建。

我的aws --version输出:

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

1 个答案:

答案 0 :(得分:0)