aws dynamodb create-table --attribute-definitions AttributeName=people_id,AttributeType=N AttributeName=name,AttributeType=S --table-name People --key-schema AttributeName=people_id,KeyType=HASH AttributeName=name,KeyType=RANGE --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 --endpoint-url http://localhost:8000
在使用aws cli操作 dynamodb的时候,经常会出现如下错误:
aws: error: argument xxx is required
检查自己的命令的时候,发现该参数是编写了的,经分析初步判断是因为在html编辑器中生成的一些特殊的空白字符无法被aws cli 识别,导致如上错误的发生。
解决方法,使用文本编辑器,将命令中的空白字符替换为空格。