Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

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)

Important

End of support notice: Existing customers will be able to use Amazon QLDB until end of support on 07/31/2025. For more details, see Migrate an Amazon QLDB Ledger to Amazon Aurora PostgreSQL.

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 one-time operations as needed. You can also use it to embed Amazon QLDB operations within utility scripts.

For CLI access, you need an access key ID and a secret access key. Use temporary credentials instead of long-term access keys when possible. Temporary credentials include an access key ID, a secret access key, and a security token that indicates when the credentials expire. For more information, see Using temporary credentials with AWS resources in the IAM User Guide.

For a complete list and usage examples of all the commands available for QLDB in the AWS CLI, see the AWS CLI Command Reference.

Note

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).

Installing and configuring the AWS CLI

The AWS CLI runs on Linux, macOS, or Windows. To install and configure it, see the following instructions 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
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.