/dynamodb-observer

DynamoDB Observer to monitor Unit Capacity usage

Primary LanguageTypeScriptMIT LicenseMIT

@dustfoundation/dynamodb-observer

CI NPM Version Minimum Node.js Version

DynamoDB Observer to monitor Unit Capacity usage.

Installation

npm install --save @dustfoundation/dynamodb-observer

Usage

Default

import { DynamoDB } from '@dustfoundation/dynamodb-observer';

const client = new DynamoDB({
  region: 'eu-central-1',
  keys: { ['table-name']: 'userId' },
});

Dynamoose

import { DynamoDB } from '@dustfoundation/dynamodb-observer';
import { aws, Schema } from 'dynamoose';

const SomeSchema = new Schema({
  userId: { type: String, hashKey: true },
});

const client = new DynamoDB({
  region: 'eu-central-1',
  keys: { ['table-name']: SomeSchema.hashKey },
});
aws.ddb.set(client);