Objectives
- Install and configure the AWS CLI
- Install AWS DynamoDB locally
- Create a local AWS DynamoDB table
- Load seed data into a local table
- Scan local data
- Query local data
Lab Details
- Install the AWS CLI.
- Use the
aws configurecommand to create a valid AWS credentials file. - Download and start a local instance of AWS DynamoDB.
- Create a table using the following command:
aws dynamodb create-table --table-name BaseballStats \ --attribute-definitions AttributeName=TeamID,AttributeType=S AttributeName=SK,AttributeType=S \ --key-schema AttributeName=TeamID,KeyType=HASH AttributeName=SK,KeyType=RANGE \ --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \ --endpoint-url http://localhost:8000Take a screenshot of the command line confirmation.
- Load BaseballStats seed data for players, games, and teams using the JSON starter files:
Take a screenshot of the command line confirmation.
- Running against the local instance of DynamoDB, scan the entire table.
Take a screenshot of the results showing the scanned data.
- Running against the local instance of DynamoDB, query the table for
TeamID = TEAMINFO_SDP.Take a screenshot of the results showing the queried data.
What did I learn?
- Install and use of the AWS CLI
- Creating a new (local) table
- Loading seed data into DynamoDB
- Scanning and querying DynamoDB from the AWS CLI