ddbsh is a simple CLI for DynamoDB modeled on isql, and the MySQL CLIs. ddbsh is open source. For more information about this, see the Licensing section below.
ddbsh presents the user with a simple command line interface. Here the user can enter SQL-like commands to DynamoDB. The output is presented in the same window. ddbsh supports many Data Definition Language (DDL) and Data Manipulation Language (DML) commands.
It is also an embeddable C++23 library with an SDK-free, terminal-free engine
(lexer, parser, command model, expression engine, SQL→API planner, execution,
and output/EXPLAIN formatting), a thin ddbsh command that wraps it, and a
browser/WebAssembly build with a web UI. Current version: 0.12.1. The engine
drives the full standard ddbsh command surface, including global tables, end
to end against real DynamoDB.
WARNING ddbsh is provided for your use on an AS-IS basis, is not supported for production use cases, and should only be used for non-production and experimental use cases. Please refer to section 7 of the License for more details.
ddbsh can operate directly against your dynamodb tables and thus delete/drop will impact your tables and the operations are irreversible. ddbsh can perform scans and queries against your data and the operations you perform count against your tables capacity, and could incur significant costs.
For details on how to restrict access to specific APIs, refer to the documentation on Fine Grained Access Control in DynamoDB.
It is strongly advised that you understand what ddbsh is doing, and experiment with ExtendDB (a local, self-hosted DynamoDB-compatible server) first.
Build the library and shell (full details in docs/BUILDING.md):
cmake -S . -B build
cmake --build buildRun one command against DynamoDB (credentials and region resolve through the standard AWS chain):
./build/ddbsh -c 'select * from Movies where year = 2014;'Or start the interactive shell and type SQL-like statements terminated by ;:
$ ddbsh
ddbsh - version 0.12.1
us-east-1> show tables;
ddbsh runs in three configurations, formed by two choices: which form of ddbsh (the native binary or the browser edition) and which backend (real Amazon DynamoDB or a self-hosted ExtendDB server).
| # | ddbsh form | Backend | Page |
|---|---|---|---|
| 1 | native binary | AWS DynamoDB | docs/configurations/01-native-aws.md |
| 2 | native binary | ExtendDB on a host | docs/configurations/02-native-extenddb.md |
| 3 | browser edition | AWS DynamoDB | docs/configurations/03-browser-aws.md |
See the configurations index for getting started, environment variables, and cross-account access.
The browser edition is a static web page: the same engine compiled to
WebAssembly, plus a pinned copy of the AWS SDK for JavaScript that signs each
request and sends it from the tab straight to DynamoDB. There is no server-side
component. You paste short-term credentials (aws sts get-session-token,
aws sts assume-role, or SSO export-credentials); they stay in the tab's
memory. Long-term AKIA… keys and non-AWS endpoints are refused. Build and
serve it locally with:
emcmake cmake --preset wasm-release && cmake --build build-preset/wasm-release
devtools/serve-web 8080 # loopback only; open http://localhost:8080/Details: docs/configurations/03-browser-aws.md. To publish the page for others (a private S3 bucket behind CloudFront, or another host), see docs/HOSTING.md.
- Building — toolchain, CMake, platforms, installing a release, and building the AWS SDK for C++ from source.
- Testing —
devtools/run-tests, the golden suite, and the native unit tests. - Contributing — how to contribute and the project direction.
- Embedding the library — the
Connection/DatabaseAPI,ddbsh::aws::open, the offlineMemoryClient, andfind_package(ddbsh). - Running ddbsh: configurations — the three run configurations, one page each.
- Hosting the browser edition — publish the page on its own origin: the CloudFormation template, upload, checks, updates, teardown.
- Command reference — the full SQL-like command surface: control, DDL, DML, and special topics.
Developer notes for the browser edition (layout, rebuilding the bundled AWS SDK
for JavaScript, the web gates) are in web/README.md.
Planned work (bugs, new language constructs, signed binaries, and more) is tracked in docs/CONTRIBUTING.md.
ddbsh is licensed under the terms of the Apache Version 2.0 (January 2004) license. See the License file here.