Skip to content

Instantly share code, notes, and snippets.

@oscaroceguera
Created January 18, 2022 00:52
Show Gist options
  • Save oscaroceguera/173b68b299ab9feafa2013fe4a969061 to your computer and use it in GitHub Desktop.
Save oscaroceguera/173b68b299ab9feafa2013fe4a969061 to your computer and use it in GitHub Desktop.
setup sh
#!/bin/sh
cd /setup
# Wait just in case LocalStack delays the start
sleep 7s
# Create table in DynamoDB
aws dynamodb create-table --endpoint-url http://localstack:4569 --cli-input-json file://create-players.json
# Insert data
aws dynamodb batch-write-item --request-items file://players-v1.json --endpoint-url http://localstack:4569
aws dynamodb batch-write-item --request-items file://players-v2.json --endpoint-url http://localstack:4569
aws dynamodb batch-write-item --request-items file://players-v3.json --endpoint-url http://localstack:4569
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment