Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

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/

Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #UpdateTable #operation #GlobalSecondaryIndexUpdates #parameter
ADD COMMENT
Topic
Name
5+6 =