我正在尝试使用CLI将项目放入DynamoDB,但出现错误:未知选项:{,“ S” :,“ do_something”,},“ CreatedOn” :, {,“ N “:,” 201412250053“,},},” TestRunId“:
ENTRY='{ "TestRunId": { "S": "do_something" }, "CreatedOn": {"N": "201412250053"} }'
JSON=$(echo ${ENTRY} | jq .)
aws dynamodb put-item --table-name TestResultsDDBTable --item ${JSON} --region ${REGION}
答案 0 :(得分:0)
如果在Windows cmd中运行它,请尝试以下操作:
aws dynamodb put-item --table-name TestResultsDDBTable --item“ { \“ TestRunId \”:{\“ S \”:\“ do_something \”},\“ CreatedOn \”:{\“ N \”: \“ 201412250053 \”}}“ --region $ {REGION}
这个问题让我困扰了一个下午,:) 我终于在这里找到解决方案:https://acloud.guru/forums/aws-dynamodb/discussion/-KUX8EQjmN7F2pNKvoWW/when-i-am-trying-to-run-below-command-aws-dynamodb-put-item-table-name-weatherst