Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lifeomic/aws-sdk-helpers

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lifeomic/aws-sdk-helpers

Utility methods to format data for AWS services

  • 3.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

aws-sdk-helpers

DynamoDB

Converter

Methods are provided to handle un/marshal calls to DynamoDB.Converter.marshal/unmarshal.
These convenience methods are meant to handle instances where the item isn't provided, thus avoiding extra tests to get code coverage.

import { dynamodb } from 'aws-sdk-helpers';
const { marshalItem, unmarshalItem } = dynamodb;

Lambda Stream Event

These methods provide easy mocking of DyanmoDB Stream records.

createStreamRecord

Provides some defaults, and properly structures the Records[].dynamodb object.

createCustomStreamRecord

Provides some defaults and properly structures the Records[] entry.

createCustomStreamRecord

A convenience method that converts Keys, OldImage, and NewImage and returns a DynamoDB Stream Record.

import { dynamodb } from 'aws-sdk-helpers';
const { stream: { createCustomStreamRecord, createDynamoDBRecord } } = dynamodb;

const dynamodbRecords = originalData.map(([Keys, OldImage, NewImage]) => createCustomStreamRecord({
  Keys,
  OldImage,
  NewImage,
}));

const Records = dynamodbRecords.map(dynamodb => createDynamoDBRecord({dynamodb}));
const event = { Records };
await lambda.invoke(event, context);

Releasing

This project uses semantic release. To trigger a release, merge a PR to master that includes commits prefixed with the relevant strings. For more info, see the spec.

Keywords

FAQs

Package last updated on 18 Jan 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc