Skip to content

Instantly share code, notes, and snippets.

@thomashartm
Created March 24, 2020 10:07
Show Gist options
  • Save thomashartm/3ce003b75d29a2af50c723ce3112e60e to your computer and use it in GitHub Desktop.
Save thomashartm/3ce003b75d29a2af50c723ce3112e60e to your computer and use it in GitHub Desktop.
DynamoDB AWS CLI cheatsheet
# query by id
aws dynamodb query \
--table-name <tablename> \
--key-condition-expression "id = :name" \
--expression-attribute-values '{
":name": { "S": "<namevalues>" }
}'
# delete item by ID
aws dynamodb delete-item \
--table-name <tablename> \
--key '{
"id": { "S": "<id>" }
}'
# Scan complete table and export to json file
aws dynamodb scan --table-name <tablename> > export.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment