sop*_*_pt 2 amazon-web-services amazon-dynamodb aws-cli
我一直在尝试使用以下json(testbootstraptable.json)文件创建dynamo数据库表:
{
"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
}
}
Run Code Online (Sandbox Code Playgroud)
我已经尝试过多次基于Google搜索的不同变体形式,但始终出现以下错误:
Error parsing parameter 'cli-input-json': Invalid JSON: Expecting value: line 1 column 1 (char 0)
JSON received: testbootstraptable.json
Run Code Online (Sandbox Code Playgroud)
AWS命令:
$ aws dynamodb create-table --cli-input-json testbootstraptable.json --region us-west-2
Run Code Online (Sandbox Code Playgroud)
将“ file://”添加到testbootstraptable.json
aws dynamodb create-table --cli-input-json file://testbootstraptable.json --region us-west-2
Run Code Online (Sandbox Code Playgroud)
另外,请删除不正确的以下行:“ NumberOfDecreasesToday”:0,
| 归档时间: |
|
| 查看次数: |
1815 次 |
| 最近记录: |