Created
January 23, 2023 09:55
-
-
Save tzach/b87dfd6ad70d2825f4734d62daca050d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
prerequisites: install unzip, awscli
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html