Introduction
Creating a table is the first step to store and organize your data in DynamoDB.
Jump into concepts and practice - no test required
aws dynamodb create-table \
--table-name TableName \
--attribute-definitions AttributeName=KeyName,AttributeType=Type \
--key-schema AttributeName=KeyName,KeyType=KeyType \
--provisioned-throughput ReadCapacityUnits=Number,WriteCapacityUnits=Numberaws dynamodb create-table \
--table-name Users \
--attribute-definitions AttributeName=UserID,AttributeType=S \
--key-schema AttributeName=UserID,KeyType=HASH \
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5aws dynamodb create-table \
--table-name Products \
--attribute-definitions AttributeName=ProductID,AttributeType=N \
--key-schema AttributeName=ProductID,KeyType=HASH \
--provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=10aws dynamodb create-table \
--table-name Books \
--attribute-definitions AttributeName=ISBN,AttributeType=S \
--key-schema AttributeName=ISBN,KeyType=HASH \
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5Users with a primary key UserId of type string?aws dynamodb create-table --table-name Products --attribute-definitions AttributeName=ProductId,AttributeType=N --key-schema AttributeName=ProductId,KeyType=HASH --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1
aws dynamodb create-table --table-name Orders --attribute-definitions AttributeName=OrderId --key-schema AttributeName=OrderId,KeyType=HASH --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1
Employees with a composite primary key: EmployeeId (string) as partition key and Department (string) as sort key. Which command correctly creates this table?