npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-red-contrib-dynamodb-variable

v1.1.1

Published

Node-RED node for storing and retrieving variables in AWS DynamoDB with flexible credential configuration

Readme

node-red-contrib-dynamodb-variable

A Node-RED node for interacting with AWS DynamoDB.

Developed by Andrii Lototskyi

📌 Install

Run the following command in the root directory of your Node-RED installation:

npm install node-red-contrib-dynamodb-variable

This module allows performing CRUD operations and table management on DynamoDB using Node-RED.


📌 Set AWS Credentials

Before using this module, configure AWS credentials inside the DynamoDB Config Node in Node-RED:

  • AWS Access Key ID
  • AWS Secret Access Key
  • AWS Region (e.g., us-east-1)

These credentials are required for authentication with AWS DynamoDB.

Credential Sources

All connection parameters support multiple input types:

  • String: Direct value stored securely in Node-RED credentials
  • Flow Context: Retrieved from flow context variables
  • Global Context: Retrieved from global context variables
  • Environment Variable: Retrieved from environment variables

📌 Available Operations

The DynamoDB Node supports the following operations:

1️⃣ Create a Table (createTable)
2️⃣ Get an item (getItem)
3️⃣ Put an item (putItem)
4️⃣ Update an item (updateItem)
5️⃣ Delete an item (deleteItem)
6️⃣ Scan a table (scan)
7️⃣ Query a table (query)

Each operation is selected in the DynamoDB Node via the dropdown menu.


📌 Example Usage in Node-RED

1️⃣ Create a new DynamoDB Table

You can create a table with Primary Key, Sort Key (optional), and Global Secondary Index (GSI).

msg.payload = {
    "tableName": "Transactions",
    "keySchema": [
        { "AttributeName": "userId", "KeyType": "HASH" },
        { "AttributeName": "createdAt", "KeyType": "RANGE" }
    ],
    "attributeDefinitions": [
        { "AttributeName": "userId", "AttributeType": "S" },
        { "AttributeName": "createdAt", "AttributeType": "N" }
    ],
    "billingMode": "PAY_PER_REQUEST" // OR "PROVISIONED"
};
return msg;

2️⃣ Get an item from DynamoDB

msg.payload = {
    "tableName": "Users",
    "key": { "userId": "12345" }
};
return msg;

3️⃣ Put an item into DynamoDB

msg.payload = {
    "tableName": "Users",
    "data": {
        "userId": "12345",
        "name": "John Doe",
        "email": "[email protected]"
    }
};
return msg;

4️⃣ Update an item in DynamoDB

msg.payload = {
    "tableName": "Users",
    "key": { "userId": "12345" },
    "updateExpression": "SET email = :email",
    "expressionValues": { ":email": "[email protected]" }
};
return msg;

5️⃣ Delete an item from DynamoDB

msg.payload = {
    "tableName": "Users",
    "key": { "userId": "12345" }
};
return msg;

6️⃣ Scan a DynamoDB table

msg.payload = {
    "tableName": "Users",
    "filterExpression": "contains(name, :namePart)",
    "expressionValues": { ":namePart": "John" }
};
return msg;

7️⃣ Query a DynamoDB table (with Sort Key and GSI support)

msg.payload = {
    "tableName": "Transactions",
    "indexName": "TransactionIndex",
    "keyConditionExpression": "userId = :userId AND createdAt >= :startDate",
    "expressionValues": {
        ":userId": "user_123",
        ":startDate": 1700000000
    },
    "projectionExpression": "userId, amount, createdAt"
};
return msg;

This will retrieve all transactions for user_123, filtering those created after timestamp 1700000000.


📌 Features & Improvements

Supports all CRUD operations in DynamoDB
Table creation with HASH key, RANGE key, and GSI support
Billing Mode (PAY_PER_REQUEST or PROVISIONED) is configurable
AWS SDK v3 with @aws-sdk/lib-dynamodb for automatic data conversion
Projection and filter expressions for more optimized queries
Supports Global Secondary Index (GSI) and Sorting
Configured directly via Node-RED UI (no settings.js required)
Easy to configure and extend


📌 Support & Issues

If you find any issues, please report them at:
GitHub Issues


📌 Author & License

  • Author: Andrii Lototskyi
  • License: ISC
  • Repository: GitHub

🚀 Happy coding with Node-RED & AWS DynamoDB! 🎉