Skip to content

Instantly share code, notes, and snippets.

@necronet
Created January 2, 2021 23:58
Show Gist options
  • Save necronet/8d8e50aabb28210ad6a5fcca992051a5 to your computer and use it in GitHub Desktop.
Save necronet/8d8e50aabb28210ad6a5fcca992051a5 to your computer and use it in GitHub Desktop.
An easy example of some aws console operation for dynamodb
# List all the tables using a profile
aws dynamodb list-tables --profile <profile_name> | jq
# Get all item in a table using a profile (expensive)
aws dynamodb scan --table-name <table_name> --profile <profile_name> | jq
# Get an specific item based on id using a profile
aws dynamodb get-item --key '{"id":{"S":"009871"}}' --table-name <table_name> --profile <profile_name> | jq
# Create an item using a profile
aws dynamodb put-item --table-name <table_name> --item file://item_example.json --profile <profile_name> | jq
# Retrieve items as batch
aws dynamodb batch-write-item --request-item file://batch_write_items.json | jq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment