Registry / aws / serverless-dynamodb-client

serverless-dynamodb-client

JSON →
library0.0.2jsnpmunverified

serverless-dynamodb-client is an abandoned Serverless Framework plugin designed to simplify interaction with AWS DynamoDB, providing a consistent API for both local DynamoDB instances and the AWS cloud service. Released as version `0.0.2` and last updated over 7 years ago, it was built specifically for Serverless Framework `0.5.x`. This package provides convenience wrappers for the AWS SDK's `DynamoDB` and `DynamoDB.DocumentClient` classes, automatically configuring them to point to a local DynamoDB instance (specifically on port 8000) when `serverless-dynamodb-local` is active, or to AWS otherwise. Due to its age and reliance on an extremely old version of the Serverless Framework, it is not compatible with modern Serverless setups (v1.x and above) and should not be used in new projects.

npm install serverless-dynamodb-client
INSTALL
IMPORT
SIG · SERVERLESS-DYNAMOD
S
serverless-dynamodb-client
awsjavascriptv0.0.2
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dynamodb.raw
✓ const dynamodb = require('serverless-dynamodb-client'); const rawClient = dynamodb.raw;
Returns an instance of `AWS.DynamoDB` configured for local or remote use based on Serverless environment.
dynamodb.doc
✓ const dynamodb = require('serverless-dynamodb-client'); const docClient = dynamodb.doc;
Returns an instance of `AWS.DynamoDB.DocumentClient` configured for local or remote use based on Serverless environment.

This quickstart demonstrates how to use `serverless-dynamodb-client` to obtain the `raw` DynamoDB client and then list existing tables. It highlights the basic CommonJS `require` pattern for this legacy plugin.

const dynamodb = require('serverless-dynamodb-client'); const rawClient = dynamodb.raw; module.exports.listTables = async (event) => { try { // Ensure that serverless-dynamodb-local is running on port 8000 for local testing const data = await rawClient.listTables().promise(); console.log("DynamoDB Tables:", data.TableNames); return { statusCode: 200, body: JSON.stringify({ message: 'Successfully listed DynamoDB tables (see console)', tables: data.TableNames, }), }; } catch (error) { console.error("Error listing tables:", error); return { statusCode: 500, body: JSON.stringify({ message: 'Failed to list DynamoDB tables', error: error.message, }), }; } };
Debug
Known issues
breakingThis plugin is designed exclusively for Serverless Framework 0.5.x and is completely incompatible with all modern versions (1.x and above). Attempting to use it with newer Serverless versions will result in critical failures and prevent deployment or local execution.
fix
Do not use this plugin. Directly integrate the AWS SDK v2 or v3 into your Lambda functions, or explore actively maintained Serverless plugins for DynamoDB integration specific to your Serverless Framework version.
affects: >=0.0.1
deprecatedThe `serverless-dynamodb-client` package is effectively abandoned, with its last update occurring over 7 years ago. It has not received updates to support newer Node.js versions, AWS SDK changes, or modern Serverless Framework architecture, making it a severe security and compatibility risk.
fix
Immediately cease using this package. Implement direct AWS SDK usage for DynamoDB interactions within your Serverless functions, leveraging modern practices and SDK versions.
affects: >=0.0.1
gotchaFor local development, this plugin requires `serverless-dynamodb-local` to be running on its default port `8000`. The plugin does not support custom port configurations, which can lead to connection issues if your local DynamoDB is running on a different port.
fix
Ensure `serverless-dynamodb-local` is correctly installed, configured, and running on port `8000`. If you require a different port, you must manually configure the AWS SDK endpoint in your code instead of relying on this plugin.
affects: >=0.0.1
Errors
Common errors & fixes
Plugin 'ServerlessDynamodbClient' not found.
The Serverless Framework version being used (e.g., v1.x, v2.x, v3.x) is incompatible with this ancient plugin's registration method, which was designed for Serverless 0.5.x.
fix
This plugin is deprecated and abandoned. Migrate to direct AWS SDK usage or a modern, actively maintained DynamoDB plugin compatible with your Serverless Framework version.
connect ECONNREFUSED 127.0.0.1:8000
During local development, the `serverless-dynamodb-local` service is either not running, or it is running on a port other than the default `8000`, which this plugin expects.
fix
Ensure that `serverless-dynamodb-local` is installed and properly configured to start on port `8000` (e.g., via `serverless dynamodb install` and `serverless dynamodb start`) before invoking your Lambda functions locally.
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies
serverless-offlinerequiredRequired for local development and to integrate with the Serverless offline environment.
serverless-dynamodb-localrequiredRequired to provide a local DynamoDB instance, which this plugin configures itself to use.
Agent activity
12 hits · last 30 days
node
12
Resources
serverless-dynamodb-client — npm install serverless-dynamodb-client · libregistry