amazon-dax-client-sdkv3
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

Amazon DAX Client for JavaScript AWS sdk-v3

The official version of amazon-dax-client does not work with AWS's javascript sdk-v3.

This is a port of the library that works with sdk-v3.

Installing

The Amazon DAX client only runs from NodeJS, and can be installed using npm:

npm install amazon-dax-client-sdkv3

https://www.npmjs.com/package/amazon-dax-client-sdkv3

Usage and Getting Started

import AmazonDaxClient from "amazon-dax-client-sdkv3";
import { DynamoDBDocumentClient, PutCommand } from "@aws-sdk/lib-dynamodb";

const documentDaxClient = new AmazonDaxClient({
    client: DynamoDBDocumentClient.from(new DynamoDBClient({
        endpoint: process.env.dax,
        region: 'us-east-2'
    }))
});

const putItem = new PutCommand({
    TableName: 'test',
    Item: {
        CommonName: `${id}`
    }
});

await documentDaxClient.send(putItem);

You can see more examples under the test folder

Dependencies (6)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i amazon-dax-client-sdkv3

    Weekly Downloads

    41

    Version

    1.0.5

    License

    Apache-2.0

    Unpacked Size

    493 kB

    Total Files

    57

    Last publish

    Collaborators

    • kwoj