我正在尝试创建 aws 表,并且已将命令保存在字符串中。现在我收到一个错误aws: error: argument --key-schema is required,因为它将 --key-schema 视为表属性的一部分。我该如何处理?
Bash 脚本
table_name="test"
table_attributes="--attribute-definitions
AttributeName=Artist,AttributeType=S
AttributeName=SongTitle,AttributeType=S --key-schema
AttributeName=Artist,KeyType=HASH
AttributeName=SongTitle,KeyType=RANGE --provisioned-throughput
ReadCapacityUnits=5,WriteCapacityUnits=5"
例如
aws dynamodb create-table --table-name $table_name $table_attributes