Amazon QLDB Node.js Driver
This is the Node.js driver for Amazon Quantum Ledger Database (QLDB), which allows Node.js developers to write software that makes use of AmazonQLDB.
See Accessing Amazon QLDB for information on connecting to AWS.
See Setting Region page for more information.
The driver is written in, and requires, TypeScript 3.5.x. It will be automatically installed as a dependency. Please see the link below for more detail on TypeScript 3.5.x:
To use the driver, in your package that wishes to use the driver, run the following:
npm install amazon-qldb-driver-nodejs
The driver also has aws-sdk, ion-js and jsbi as peer dependencies. Thus, they must also be dependencies of the package that will be using the driver as a dependency.
npm install aws-sdk
npm install ion-js
npm install jsbi
Then from within your package, you can now use the driver by importing it. This example shows usage in TypeScript specifying the QLDB ledger name and a specific region:
;const testServiceConfigOptions =region: "us-east-1";const qldbDriver: QldbDriver = "testLedger" testServiceConfigOptions;qldbDriver;
- Amazon QLDB Nodejs Driver Tutorial: In this tutorial, you use the QLDB Driver for Node.js to create an Amazon QLDB ledger and populate it with tables and sample data.
- Amazon QLDB Nodejs Driver Samples: A DMV based example application which demonstrates how to use QLDB with the QLDB Driver for Node.js.
- QLDB Nodejs driver accepts and returns Amazon ION Documents. Amazon Ion is a richly-typed, self-describing, hierarchical data serialization format offering interchangeable binary and text representations. For more information read the ION docs.
- Amazon ION Cookbook: This cookbook provides code samples for some simple Amazon Ion use cases.
- Amazon QLDB supports the PartiQL query language. PartiQL provides SQL-compatible query access across multiple data stores containing structured data, semistructured data, and nested data. For more information read the PartiQL docs.
- Refer the section Common Errors while using the Amazon QLDB Drivers which describes runtime errors that can be thrown by the Amazon QLDB Driver when calling the qldb-session APIs.
To install the driver, run the following in the root directory of the project:
npm run build
You can run the unit tests with this command:
npm run testWithCoverage
You can run the integration tests with this command:
npm run integrationTest
This command requires that credentials are pre-configured and it has the required permissions.
Additionally, a region can be specified in:
TypeDoc is used for documentation. You can generate HTML locally with the following:
npm run doc
This library is licensed under the Apache 2.0 License.