Getting Started
The most advanced bridge between AWS DynamoDB Document Client and Real World usage.
Introduction
Dynatron provides a number of abstractions, tools, utility functions designed to make dealing with Amazon DynamoDB easier and more natural for developers.
Dynatron is based on the latest AWS SDK version 3 and works equally good for node
and browser
.
Dynatron provides utilities for automatically submitting arbitrarily-sized batches of reads and writes to DynamoDB using well-formed BatchGetItem and BatchWriteItem operations, correct and reliable Scan and Query operations.
Dynatron has built-in defaults and mechanisms based on real-world applications making the requests to Amazon DynamoDB more reliable, adding exponential reties for applicable requests, optimizing API calls, and more...
Installation
Install Dynatron
Dynatron can be installed from npm
Install Peer Dependencies
Dynatron uses the AWS SDK DynamoDB Client but does not distribute it. Therefore, for Dynatron to work you need to install its peer dependencies.
Usage
DynatronClient Initialization
Dynatron Initialization
More Complete Approach
We suggest initializing the Dynatron class in a separate function where you could have a logic to check with which mode it should run. In serverless applications, you can pass in env variables and do the configuration based on them. You could create a file called dynatron-client.ts
or similar which will also allow caching the initialized dynatron instance.
Dynatron also provides a special function called loadProfileCredentials
. It can load the AWS credentials from the disk.
Last updated