0
0
DynamoDBquery~30 mins

AWS CLI for DynamoDB - Mini Project: Build & Apply

Choose your learning style9 modes available
AWS CLI for DynamoDB
📖 Scenario: You are working as a cloud engineer. Your team uses AWS DynamoDB to store user data. You need to practice using the AWS Command Line Interface (CLI) to manage DynamoDB tables and items.
🎯 Goal: Learn how to create a DynamoDB table, add items, query items, and update table settings using AWS CLI commands.
📋 What You'll Learn
Use AWS CLI commands to create and manage DynamoDB tables
Create a table with a primary key
Insert items into the table
Query items by primary key
Update table throughput settings
💡 Why This Matters
🌍 Real World
Managing DynamoDB tables and items via AWS CLI is common for automation, scripting, and quick management without using the AWS Console.
💼 Career
Cloud engineers and developers often use AWS CLI to manage DynamoDB resources efficiently in real projects.
Progress0 / 4 steps
1
Create a DynamoDB table
Use the AWS CLI command aws dynamodb create-table to create a table named Users with a primary key called UserId of type S (string). Set the read and write capacity units to 5 each.
DynamoDB
Need a hint?

Remember to specify the table name, attribute definitions, key schema, and provisioned throughput exactly as shown.

2
Add an item to the Users table
Use the AWS CLI command aws dynamodb put-item to add an item to the Users table. The item should have UserId set to user123 and Name set to John Doe.
DynamoDB
Need a hint?

Use JSON format for the item attributes with correct data types.

3
Query the item by UserId
Use the AWS CLI command aws dynamodb get-item to retrieve the item from the Users table where UserId is user123.
DynamoDB
Need a hint?

Use the --key option with JSON specifying the primary key to get the item.

4
Update the table's provisioned throughput
Use the AWS CLI command aws dynamodb update-table to change the Users table's read capacity units to 10 and write capacity units to 5.
DynamoDB
Need a hint?

Use the update-table command with the correct provisioned throughput values.