DynamoDB
Read and write Amazon DynamoDB items in plain JSON: get, put, key queries, scans with filters, PartiQL, batch writes and tables. Typical uses: read an AWS application's data, load rows into a table.
dynamodb pingdynamodb collection_createdynamodb collectionsdynamodb putdynamodb putdynamodb getdynamodb getdynamodb updatedynamodb updatedynamodb insertdynamodb batch_getdynamodb querydynamodb querydynamodb query_keysdynamodb query_keysdynamodb finddynamodb finddynamodb countdynamodb countdynamodb deletedynamodb deletedynamodb delete_keysdynamodb delete_wheredynamodb delete_wheredynamodb operationdynamodb collection_infodynamodb collection_drop

dynamodb ping <config>


Description

    Test the endpoint and the signature (ListTables of one name). Returns {ok}

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
admin
dynamodb ping "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}"
mentdb
{"ok": true}

dynamodb collection_create <config> <table> <json_definition>


Description

    Create a table and wait until it is ACTIVE. Returns {created, status}

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_definition:   partition_key, partition_type (S, N or B; S), sort_key, sort_type, billing (PAY_PER_REQUEST or PROVISIONED), read_capacity and write_capacity (5, PROVISIONED), wait (true) - String - required
admin
dynamodb collection_create "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"partition_key\": \"customer\", \"sort_key\": \"order_id\", \"sort_type\": \"N\"}"
mentdb
{"created": "orders", "status": "ACTIVE"}

dynamodb collections <config>


Description

    The names of the tables (all the pages)

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
admin
dynamodb collections "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}"
mentdb
["orders"]

dynamodb put <config> <table> <json_item>


Description

    Write an item (it contains its key; it replaces the item of the same key). Returns the item

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_item:   The item as a JSON object - String - required
admin
dynamodb put "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": \"C1\", \"order_id\": 1, \"total\": 12.5, \"paid\": true, \"lines\": [{\"sku\": \"A\", \"qty\": 2}], \"tags\": {\"$ss\": [\"web\", \"new\"]}}"
mentdb
{"customer": "C1", "lines": [{"qty": 2, "sku": "A"}], "order_id": 1, "paid": true, "tags": ["web", "new"], "total": 12.5}

dynamodb put <config> <table> <json_item> <json_params>


Description

    Write with parameters: condition, names, values, return_old (true: returns the previous item or null)

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_item:   The item - String - required
    json_params:   The parameters - String - required
admin
dynamodb put "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": \"C1\", \"order_id\": 1, \"total\": 0}" "{\"condition\": \"attribute_not_exists(order_id)\"}"
mentdb
ERROR: Sorry, an error appears (dynamodb error ConditionalCheckFailedException: The conditional request failed (HTTP 400)).
replace and get the previous item (fixed result: real DynamoDB Local)
admin
dynamodb put "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": \"C1\", \"order_id\": 1, \"total\": 13, \"paid\": true}" "{\"return_old\": true}"
mentdb
{"customer": "C1", "lines": [{"qty": 2, "sku": "A"}], "order_id": 1, "paid": true, "tags": ["new", "web"], "total": 12.5}

dynamodb get <config> <table> <json_key>


Description

    Read an item by its key; null if absent

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_key:   The primary key as a JSON object (partition key, and sort key if the table has one) - String - required
admin
dynamodb get "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": \"C1\", \"order_id\": 1}"
mentdb
{"customer": "C1", "order_id": 1, "paid": true, "total": 13}
no such item (fixed result: real DynamoDB Local)
admin
dynamodb get "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": \"C1\", \"order_id\": 99}"
mentdb
null

dynamodb get <config> <table> <json_key> <json_params>


Description

    Read with parameters: projection (a list of attributes), consistent (false)

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_key:   The primary key as a JSON object (partition key, and sort key if the table has one) - String - required
    json_params:   The parameters - String - required
admin
dynamodb get "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": \"C1\", \"order_id\": 1}" "{\"projection\": [\"total\", \"paid\"], \"consistent\": true}"
mentdb
{"paid": true, "total": 13}

dynamodb update <config> <table> <json_key> <json_set>


Description

    Set attributes of the item of a key (created if absent; null sets NULL). Returns {matched, modified, item} with the whole item after the update

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_key:   The primary key as a JSON object (partition key, and sort key if the table has one) - String - required
    json_set:   The attributes to set, as a JSON object ({} if only remove or add) - String - required
admin
dynamodb update "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": \"C1\", \"order_id\": 1}" "{\"status\": \"shipped\"}"
mentdb
{"matched": 1, "modified": 1, "item": {"customer": "C1", "order_id": 1, "paid": true, "status": "shipped", "total": 13}}

dynamodb update <config> <table> <json_key> <json_set> <json_params>


Description

    Update with parameters: remove (attributes to remove), add (numbers to add, or sets to merge), condition, names, values

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_key:   The primary key as a JSON object (partition key, and sort key if the table has one) - String - required
    json_set:   The attributes to set - String - required
    json_params:   The parameters - String - required
admin
dynamodb update "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": \"C1\", \"order_id\": 1}" "{}" "{\"add\": {\"visits\": 1}, \"remove\": [\"paid\"]}"
mentdb
{"matched": 1, "modified": 1, "item": {"customer": "C1", "order_id": 1, "status": "shipped", "total": 13, "visits": 1}}
a condition on a reserved word: refused (fixed result: real DynamoDB Local)
admin
dynamodb update "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": \"C1\", \"order_id\": 1}" "{\"status\": \"closed\"}" "{\"condition\": \"#s = :s\", \"names\": {\"#s\": \"status\"}, \"values\": {\":s\": \"pending\"}}"
mentdb
ERROR: Sorry, an error appears (dynamodb error ConditionalCheckFailedException: The conditional request failed (HTTP 400)).

dynamodb insert <config> <table> <json_rows>


Description

    Write many items (1000000 at most) with BatchWriteItem, 25 per request; the unprocessed items are retried. Returns {inserted, errors, requests}

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_rows:   The items as a JSON array of objects - String - required
admin
dynamodb insert "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "[{\"customer\": \"C2\", \"order_id\": 1, \"total\": 5}, {\"customer\": \"C2\", \"order_id\": 2, \"total\": 7.25}, {\"customer\": \"C3\", \"order_id\": 1, \"total\": 9}, {\"customer\": \"C4\", \"order_id\": 1, \"total\": 1}]"
mentdb
{"inserted": 4, "errors": [], "requests": 1}

dynamodb batch_get <config> <table> <json_keys>


Description

    Read many items by key with BatchGetItem, 100 per request (absent keys give nothing; the order is not kept)

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_keys:   The keys as a JSON array of objects - String - required
admin
dynamodb batch_get "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "[{\"customer\": \"C2\", \"order_id\": 2}, {\"customer\": \"C9\", \"order_id\": 1}]"
mentdb
[{"customer": "C2", "order_id": 2, "total": 7.25}]

dynamodb query <config> <statement>


Description

    Run a PartiQL statement (SELECT, INSERT, UPDATE, DELETE): rows (all the pages up to 10000)

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    statement:   The PartiQL statement - String - required
admin
dynamodb query "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "SELECT customer, order_id FROM orders WHERE customer = 'C2'"
mentdb
[{"customer": "C2", "order_id": 1}, {"customer": "C2", "order_id": 2}]

dynamodb query <config> <statement> <json_params>


Description

    PartiQL with parameters: values (plain JSON array for the ?), limit (10000), consistent

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    statement:   The statement - String - required
    json_params:   The parameters - String - required
admin
dynamodb query "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "UPDATE orders SET total = ? WHERE customer = ? AND order_id = ?" "{\"values\": [8, \"C2\", 2]}"
mentdb
[]
one row (fixed result: real DynamoDB Local)
admin
dynamodb query "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "SELECT order_id, total FROM orders WHERE customer = ?" "{\"values\": [\"C2\"], \"limit\": 1}"
mentdb
[{"order_id": 1, "total": 5}]

dynamodb query_keys <config> <table> <key_condition> <json_values>


Description

    The items of a partition (Query with a key condition and its values): rows, all the pages up to the limit

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    key_condition:   The key condition expression, like customer = :c AND order_id > :n - String - required
    json_values:   The values of the expression as a JSON object, like {":c": "C2"} - String - required
admin
dynamodb query_keys "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "customer = :c" "{\":c\": \"C2\"}"
mentdb
[{"customer": "C2", "order_id": 1, "total": 5}, {"customer": "C2", "order_id": 2, "total": 8}]

dynamodb query_keys <config> <table> <key_condition> <json_values> <json_params>


Description

    Query with parameters: index, filter, names, projection, forward (true; false: descending sort key), consistent, limit (10000), page_size (the Limit of each request), count (true: returns the number of items)

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    key_condition:   The key condition - String - required
    json_values:   The values - String - required
    json_params:   The parameters - String - required
admin
dynamodb query_keys "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "customer = :c" "{\":c\": \"C2\", \":min\": 6}" "{\"forward\": false, \"filter\": \"#t >= :min\", \"names\": {\"#t\": \"total\"}, \"projection\": [\"order_id\", \"total\"]}"
mentdb
[{"order_id": 2, "total": 8}]
a count (fixed result: real DynamoDB Local)
admin
dynamodb query_keys "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "customer = :c" "{\":c\": \"C2\"}" "{\"count\": true}"
mentdb
2

dynamodb find <config> <table> <json_filter>


Description

    The items matching a filter (equality per attribute, an array means IN; {} for all), with a Scan: rows, all the pages up to 10000 items

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_filter:   The filter as a JSON object: equality per attribute, an array means IN ({} for none) - String - required
admin
dynamodb find "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{}"
mentdb
[{"customer": "C1", "order_id": 1, "status": "shipped", "total": 13, "visits": 1}, {"customer": "C2", "order_id": 1, "total": 5}, {"customer": "C2", "order_id": 2, "total": 8}, {"customer": "C4", "order_id": 1, "total": 1}, {"customer": "C3", "order_id": 1, "total": 9}]
two customers (fixed result: real DynamoDB Local)
admin
dynamodb find "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": [\"C2\", \"C3\"]}"
mentdb
[{"customer": "C2", "order_id": 1, "total": 5}, {"customer": "C2", "order_id": 2, "total": 8}, {"customer": "C3", "order_id": 1, "total": 9}]

dynamodb find <config> <table> <json_filter> <json_options>


Description

    Find with options: fields, limit, page_size, consistent, index, filter (an expression, added with AND), names, values, segment and total_segments (a parallel scan done by several calls)

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_filter:   The filter as a JSON object: equality per attribute, an array means IN ({} for none) - String - required
    json_options:   The options - String - required
admin
dynamodb find "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{}" "{\"filter\": \"#t > :t\", \"names\": {\"#t\": \"total\"}, \"values\": {\":t\": 6}, \"fields\": [\"customer\", \"order_id\", \"total\"]}"
mentdb
[{"customer": "C1", "order_id": 1, "total": 13}, {"customer": "C2", "order_id": 2, "total": 8}, {"customer": "C3", "order_id": 1, "total": 9}]

dynamodb count <config> <table>


Description

    The number of items of a table (a Scan with Select COUNT)

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
admin
dynamodb count "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders"
mentdb
5

dynamodb count <config> <table> <json_filter>


Description

    The number of items matching a filter

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_filter:   The filter as a JSON object: equality per attribute, an array means IN ({} for none) - String - required
admin
dynamodb count "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": \"C2\"}"
mentdb
2

dynamodb delete <config> <table> <json_key>


Description

    Delete the item of a key. Returns {deleted}: 1, or 0 if it did not exist

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_key:   The primary key as a JSON object (partition key, and sort key if the table has one) - String - required
admin
dynamodb delete "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": \"C2\", \"order_id\": 1}"
mentdb
{"deleted": 1}
no such item (fixed result: real DynamoDB Local)
admin
dynamodb delete "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": \"C2\", \"order_id\": 9}"
mentdb
{"deleted": 0}

dynamodb delete <config> <table> <json_key> <json_params>


Description

    Delete with parameters: condition, names, values

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_key:   The primary key as a JSON object (partition key, and sort key if the table has one) - String - required
    json_params:   The parameters - String - required
admin
dynamodb delete "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": \"C1\", \"order_id\": 1}" "{\"condition\": \"#s = :s\", \"names\": {\"#s\": \"status\"}, \"values\": {\":s\": \"closed\"}}"
mentdb
ERROR: Sorry, an error appears (dynamodb error ConditionalCheckFailedException: The conditional request failed (HTTP 400)).

dynamodb delete_keys <config> <table> <json_keys>


Description

    Delete many items by key with BatchWriteItem, 25 per request. Returns {deleted}: the number of keys sent

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_keys:   The keys as a JSON array of objects - String - required
admin
dynamodb delete_keys "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "[{\"customer\": \"C3\", \"order_id\": 1}]"
mentdb
{"deleted": 1}

dynamodb delete_where <config> <table> <json_filter>


Description

    Delete the items matching a filter: a Scan of their keys (sent back exactly as DynamoDB gave them), then batch deletes. Returns {deleted, complete}: complete is false when more items matched than the limit

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_filter:   The filter as a JSON object: equality per attribute, an array means IN ({} for none) - String - required
admin
dynamodb delete_where "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{\"customer\": \"C4\"}"
mentdb
{"deleted": 1, "complete": true}

dynamodb delete_where <config> <table> <json_filter> <json_options>


Description

    Delete with options: filter (an expression), names, values, limit (100000 items by default, 1000000 at most)

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
    json_filter:   The filter as a JSON object: equality per attribute, an array means IN ({} for none) - String - required
    json_options:   The options - String - required
admin
dynamodb delete_where "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders" "{}" "{\"filter\": \"#t < :t\", \"names\": {\"#t\": \"total\"}, \"values\": {\":t\": 2}}"
mentdb
{"deleted": 0, "complete": true}

dynamodb operation <config> <operation> <json_body>


Description

    Any operation of the DynamoDB API with its JSON body in the DynamoDB format ({"S": ...}). Returns the JSON response as it is

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    operation:   The operation, like TransactWriteItems or DescribeTimeToLive - String - required
    json_body:   The request body - String - required
admin
dynamodb operation "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "DescribeTimeToLive" "{\"TableName\": \"orders\"}"
mentdb
{"TimeToLiveDescription": {"TimeToLiveStatus": "DISABLED"}}

dynamodb collection_info <config> <table>


Description

    The description of a table, as sent by DynamoDB (keys, status, item count, indexes...)

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
admin
dynamodb collection_info "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders"
mentdb
{"AttributeDefinitions": [{"AttributeName": "customer", "AttributeType": "S"}, {"AttributeName": "order_id", "AttributeType": "N"}], "TableName": "orders", "KeySchema": [{"AttributeName": "customer", "KeyType": "HASH"}, {"AttributeName": "order_id", "KeyType": "RANGE"}], "TableStatus": "ACTIVE", "CreationDateTime": 1.794915872453E9, "ProvisionedThroughput": {"LastIncreaseDateTime": 0, "LastDecreaseDateTime": 0, "NumberOfDecreasesToday": 0, "ReadCapacityUnits": 0, "WriteCapacityUnits": 0}, "TableSizeBytes": 75, "ItemCount": 2, "TableArn": "arn:aws:dynamodb:ddblocal:000000000000:table/orders", "BillingModeSummary": {"BillingMode": "PAY_PER_REQUEST", "LastUpdateToPayPerRequestDateTime": 1.794915872453E9}, "DeletionProtectionEnabled": false}

dynamodb collection_drop <config> <table>


Description

    Delete a table. Returns {dropped, status}

Parameters

    config:   The DynamoDB configuration as JSON: access_key and secret_key (the name of a secret: secret set), session_token (the name of a secret: secret set), region (us-east-1), endpoint (https://dynamodb..amazonaws.com; http only for localhost, like DynamoDB Local), timeout_ms (30000) - String - required
    table:   The name of the table - String - required
admin
dynamodb collection_drop "{\"access_key\": \"aws_access_key_id\", \"secret_key\": \"aws_secret_access_key\", \"region\": \"eu-west-3\", \"endpoint\": \"http://localhost:8000\"}" "orders"
mentdb
{"dropped": "orders", "status": "ACTIVE"}