Created
February 24, 2019 05:35
-
-
Save timelincoln7648/23f8856314ee24772fdef9e9daa21047 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
# Local Accounts table | |
RESULT=$(aws dynamodb describe-table \ | |
--region us-east-1 \ | |
--endpoint-url $DYNAMODB_ENDPOINT \ | |
--table-name test_Accounts) | |
CODE=$? | |
if [ $? -eq 0 ]; then | |
aws dynamodb delete-table \ | |
--region us-east-1 \ | |
--endpoint-url $DYNAMODB_ENDPOINT \ | |
--table-name test_Accounts | |
fi | |
aws dynamodb create-table \ | |
--region us-east-1 \ | |
--endpoint-url $DYNAMODB_ENDPOINT \ | |
--table-name test_Accounts \ | |
--key-schema AttributeName=uuid,KeyType=HASH \ | |
--attribute-definitions AttributeName=uuidname,AttributeType=S \ | |
--provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=10 | |
# Local Users table | |
RESULT=$(aws dynamodb describe-table \ | |
--region us-east-1 \ | |
--endpoint-url $DYNAMODB_ENDPOINT \ | |
--table-name test_Users) | |
CODE=$? | |
if [ $? -eq 0 ]; then | |
aws dynamodb delete-table \ | |
--region us-east-1 \ | |
--endpoint-url $DYNAMODB_ENDPOINT \ | |
--table-name test_Users | |
fi | |
aws dynamodb create-table \ | |
--region us-east-1 \ | |
--endpoint-url $DYNAMODB_ENDPOINT \ | |
--table-name test_Users \ | |
--key-schema AttributeName=username,KeyType=HASH \ | |
--attribute-definitions AttributeName=username,AttributeType=S \ | |
--provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=10 | |
# Local Messages table | |
RESULT=$(aws dynamodb describe-table \ | |
--region us-east-1 \ | |
--endpoint-url $DYNAMODB_ENDPOINT \ | |
--table-name test_Messages) | |
CODE=$? | |
if [ $? -eq 0 ]; then | |
aws dynamodb delete-table \ | |
--region us-east-1 \ | |
--endpoint-url $DYNAMODB_ENDPOINT \ | |
--table-name test_Messages | |
fi | |
aws dynamodb create-table \ | |
--region us-east-1 \ | |
--endpoint-url $DYNAMODB_ENDPOINT \ | |
--table-name test_Messages \ | |
--key-schema AttributeName=room,KeyType=HASH AttributeName=message,KeyType=RANGE \ | |
--attribute-definitions AttributeName=room,AttributeType=S AttributeName=message,AttributeType=S \ | |
--provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment