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 識別,導致如上錯誤的發生。
解決方法,使用文本編輯器,將命令中的空白字符替換爲空格。