Skip to content

Instantly share code, notes, and snippets.

@tzach
Created January 23, 2023 09:55
Show Gist options
  • Save tzach/b87dfd6ad70d2825f4734d62daca050d to your computer and use it in GitHub Desktop.
Save tzach/b87dfd6ad70d2825f4734d62daca050d to your computer and use it in GitHub Desktop.
export SCYLLA_CLOUD='http://44.196.30.13:8000'
aws --region=us-east-1 --endpoint-url $SCYLLA_CLOUD dynamodb delete-table --table-name MusicCollection
aws --region=us-east-1 --endpoint-url $SCYLLA_CLOUD dynamodb create-table --table-name MusicCollection \
--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 --endpoint-url $SCYLLA_CLOUD dynamodb put-item \
--table-name MusicCollection \
--item \
'{"Artist": {"S": "No One You Know"}, "SongTitle": {"S": "Call Me Today"}, "AlbumTitle": {"S": "Somewhat Famous"}, "Awards": {"N": "1"}, "ttl": {"N": "'$(($(date +%s)+30))'"}}'
aws --endpoint-url $SCYLLA_CLOUD dynamodb scan --table-name MusicCollection
aws --region=us-east-1 --endpoint-url $SCYLLA_CLOUD dynamodb delete-table --table-name MusicCollection
@tzach
Copy link
Author

tzach commented Jan 15, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment