CmdID

CmdID / Commands

aws-dynamodb

Manipulate an AWS DynamoDB database, a fast NoSQL database with predictable performance and seamless scalability. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Create a table

aws dynamodb create-table --table-name table_name --attribute-definitions AttributeName=S,AttributeType=S --key-schema AttributeName=S,KeyType=HASH --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5Identify
--table-nameThe name of the table to create. AWS CLI reference
--attribute-definitionsAn array of attributes that describe the key schema for the table and indexes. AWS CLI reference
--key-schemaSpecifies the attributes that make up the primary key for a table or an index. AWS CLI reference
--provisioned-throughputRepresents the provisioned throughput settings for a specified table or index. AWS CLI reference

List all tables in the DynamoDB

aws dynamodb list-tablesIdentify

Get details about a specific table

aws dynamodb describe-table --table-name table_nameIdentify
--table-nameThe name of the table to describe. AWS CLI reference

Add an item to a table

aws dynamodb put-item --table-name table_name --item '{"AttributeName": {"S": "value"\}\}'Identify
--table-nameThe name of the table to contain the item. AWS CLI reference
--itemA map of attribute name/value pairs, one for each attribute. AWS CLI reference

Retrieve an item from a table

aws dynamodb get-item --table-name table_name --key '{"ID": {"N": "1"\}\}'Identify
--table-nameThe name of the table containing the requested item. AWS CLI reference
--keyA map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve. AWS CLI reference

Update an item in the table

aws dynamodb update-item --table-name table_name --key '{"ID": {"N": "1"\}\}' --update-expression "SET Name = :n" --expression-attribute-values '{":n": {"S": "Jane"\}\}'Identify
--table-nameThe name of the table containing the item to update. AWS CLI reference
--keyThe primary key of the item to be updated. AWS CLI reference
--update-expressionAn expression that defines one or more attributes to be updated, the action to be performed on them, and new values for them. AWS CLI reference
--expression-attribute-valuesOne or more values that can be substituted in an expression. AWS CLI reference

Scan items in the table

aws dynamodb scan --table-name table_nameIdentify
--table-nameThe name of the table containing the requested items or if you provide IndexName, the name of the table to which that index belongs. AWS CLI reference

Delete an item from the table

aws dynamodb delete-item --table-name table_name --key '{"ID": {"N": "1"\}\}'Identify
--table-nameThe name of the table from which to delete the item. AWS CLI reference
--keyA map of attribute names to AttributeValue objects, representing the primary key of the item to delete. AWS CLI reference