I am trying to create aws tables and I have saved the command within a string. Now I get an error aws: error: argument --key-schema is required
because it sees --key-schema as part of the table attribute. How do I handle this?
Bash Script
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"
e.g
aws dynamodb create-table --table-name $table_name $table_attributes