UpdateTable operation with the GlobalSecondaryIndexUpdates parameter code example
Example: UpdateTable operation with the GlobalSecondaryIndexUpdates parameter
aws dynamodb update-table \
--region eu-west-1 \
--endpoint-url http://127.0.0.1:8000 \
--table-name ssib_dev_assetsTable \
--attribute-definitions AttributeName=AssetGroup,AttributeType=S \
--global-secondary-index-updates '[{"Create":{"IndexName":"gsi_group","KeySchema":[{"AttributeName":"AssetGroup","KeyType":"HASH"}],"Projection":{"ProjectionType":"ALL"},"ProvisionedThroughput":{"ReadCapacityUnits":5,"WriteCapacityUnits":5}}}]'
By the way, you should probably use the official image instead of some image by some random user docker user: https://hub.docker.com/r/amazon/dynamodb-local/