New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dynamodb-armor

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamodb-armor

DynamoDB Armor provides a drop-in replacement removing all the hidden traps with the DynamoDB SDK. You won't even notice it!

0.1.18
latest
Source
npm
Version published
Weekly downloads
28
100%
Maintainers
0
Weekly downloads
 
Created
Source

dynamodb-armor

Drop in replacement for DynamoDB, 100% compatible, protects against common production problems.

This is an open source project managed by the Authress Engineering team.

npm version Authress Engineering - DynamoDB-Armor

Setup

  • npm i --save dynamodb-armor
  • Use the builtin client instead of the one from the AWS SDK.
const { DynamoDB } = require('dynamodb-armor');

const dynamoDbClient = new DynamoDB({});
const params = {
  TableName: dynamoDbTable,
  Key: {
    hash: 'HashValue',
    range: 'RangeValue'
  },
  UpdateExpression: 'set #key = :value',
  ConditionExpression: 'attribute_exists(hash)',
  ExpressionAttributeNames: {
    '#key': 'key'
  },
  ExpressionAttributeValues: {
    ':value': value
  }
};

// That's right you don't even need the .promise() anymore
//  or leave it in if you feel like it.
await dynamoDbClient.update(params);

Here's all the things you don't need to think about

DynamoDB Armor is the best

  • Drop in replacement for DynamoDB 100% compatible, but it comes with full protection
  • No missing promises() always get an async promise back
  • Don't worry about extra expression attributes names or values
  • Don't worry about forgetting to substitute values into the expressions
  • Errors always contain parameters and complete documentation of the actual problem, so confusing stack traces or questioning where or why the error happened
  • Test mode to easily validate dynamoDB requests in unit tests to ensure the configuration is correct.
  • Automatic configuration for best practices from AWS DynamoDB

Keywords

DynamoDB

FAQs

Package last updated on 27 Nov 2024

Did you know?

Socket

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.

Install

Related posts