gpt4 book ai didi

amazon-web-services - 使用 aws cli "--cli-input-json"创建 dynamodb 表

转载 作者:行者123 更新时间:2023-12-04 15:51:02 25 4
gpt4 key购买 nike

我一直在尝试使用以下 json(testbootstraptable.json) 文件创建一个 dynamo db 表:

{
"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
}
}

我已经根据谷歌搜索尝试了不同的变体,但不断收到以下错误:
Error parsing parameter 'cli-input-json': Invalid JSON: Expecting value: line 1 column 1 (char 0)
JSON received: testbootstraptable.json

AWS 命令​​:
$ aws dynamodb create-table --cli-input-json testbootstraptable.json --region us-west-2

最佳答案

将“file://”添加到 testbootstraptable.json

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

另外,删除以下行,因为它不正确:
"NumberOfDecreasesToday": 0,

关于amazon-web-services - 使用 aws cli "--cli-input-json"创建 dynamodb 表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46637946/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com