Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
@brightcove/dynamodb-connector
Advanced tools
Provides a set of helpful functions for connecting to DynamoDB and performing operations
Provides a standardized way to connect to an AWS DynamoDB database using the v3 AWS javascript SDK.
npm install @brightcove/dynamodb-connector --save
const { DynamoDBConnector } = require('@brightcove/dynamodb-connector');
// Localstack configuration example
const db = new DynamoDBConnector({
clientConfig: {
endpoint: 'http://localhost:4566,
region: 'us-east-1'
}
});
...
const result = await db.query({
TableName: 'my-table',
...
});
Param | Type | Description | Required |
---|---|---|---|
clientConfig | DynamoDBClientConfig | https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/TypeAlias/DynamoDBClientConfigType | yes |
translateConfig | TranslateConfig | https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-lib-dynamodb/TypeAlias/TranslateConfig | no |
logger | Logger | What will be used for logging errors (ie. logger.error()). console is used by default if not specified | no |
This version includes breaking changes by requiring the DynamoDBDocument
to be passed in as an option. This drasticaly reduces the size of this package and removes all external dependencies.
import { DynamoDBDocument } from '@aws-sdk/lib-dynamodb';
import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
import { DynamoDBConnector } from '@brightcove/dynamodb-connector';
const client = new DynamoDBClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1'
});
const document = DynamoDBDocument.from(client);
const db = new DynamoDBConnector({ document });
...
const result = await db.query({
TableName: 'my-table',
...
});
Param | Type | Description | Required |
---|---|---|---|
document | DynamoDBDocument | https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-lib-dynamodb/Class/DynamoDBDocument | yes |
logger | Logger | What will be used for logging errors (ie. logger.error()). console is used by default if not specified | no |
FAQs
Provides a set of helpful functions for connecting to DynamoDB and performing operations
We found that @brightcove/dynamodb-connector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.