Accessing Amazon QLDB using the AWS CLI (management API only) - Amazon Quantum Ledger Database (Amazon QLDB)

Accessing Amazon QLDB using the AWS CLI (management API only)

You can use the AWS Command Line Interface (AWS CLI) to control multiple AWS services from the command line and automate them through scripts. You can use the AWS CLI for ad hoc operations. You can also use it to embed Amazon QLDB operations within utility scripts.

Before you can use the AWS CLI with QLDB, you must get an access key ID and secret access key. For more information, see Getting IAM user access keys.

For a complete listing of all the commands available for QLDB in the AWS CLI, see the AWS CLI Command Reference.


The AWS CLI only supports the qldb management API operations that are listed in the Amazon QLDB API reference. This API is used only for managing ledger resources and for non-transactional data operations.

To run data transactions with the qldb-session API using a command line interface, see Accessing Amazon QLDB using the QLDB shell (data API only).

Downloading and configuring the AWS CLI

The AWS CLI runs on Windows, macOS, or Linux. To download, install, and configure it, follow these steps:

  1. Download the AWS CLI at

  2. Follow the instructions for Installing the AWS CLI and Configuring the AWS CLI in the AWS Command Line Interface User Guide.

Using the AWS CLI with QLDB

The command line format consists of an Amazon QLDB operation name, followed by the parameters for that operation. The AWS CLI supports a shorthand syntax for the parameter values, in addition to JSON.

Use help to list all available commands in QLDB:

aws qldb help

You can also use help to describe a specific command and learn more about its usage:

aws qldb create-ledger help

For example, to create a ledger:

aws qldb create-ledger --name my-example-ledger --permissions-mode STANDARD