GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - goldcaddy77/serverless-dynamo-client: 🚀 Wrapper around the official dynamoDB client that plays well with serverless-offline

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.nvmrc
.nvmrc
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
index.js
index.js
 
 
index.test.js
index.test.js
 
 
package.json
package.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

serverless-dynamo-client

serverless npm version Standard - JavaScript Style Guide

AWS DynamoDB client

This is a wrapper around the official AWS.DynamoDB SDK that:

  • Plays nicely with serverless-offline by providing sane defaults based on IS_OFFLINE environment variable.
  • Looks for AWS region in configurable environment variable (details below)

Table of Contents

  • Install
  • Usage
  • API
  • Contribute
  • License

Install

npm install --save serverless-dynamo-client

Usage

var dynamo = require('serverless-dynamo-client')

const client = dynamo.getClient({
  envPrefix: 'AWS_DDB',
  maxRetries: 3
})

const docClient = dynamo.getDocumentClient({
  convertEmptyValues: true
})

API

Shared [options]

The following options are shared between the two methods below.

  • envPrefix {string} if this is set, DDB will look for config in environment variables prefixed by envPrefix.
  • region {string} if not set, DDB will look in ${envPrefix}_REGION. If envPrefix is not set, it looks at AWS_REGION. If still not found, when in serverless-offline mode, it will fall back to localhost
  • endpoint {string} if in serverless-offline mode, this defaults to http://localhost:8000
  • sslEnabled {boolean} defaults to true, if in serverless-offline mode, it is set to false

getClient([options])

  • options {Object - shared options above or AWS.DynamoDB standard options}

Method: dynamo.getClient

Creates an AWS.DynamoDB with provided options.

var dynamo = require('serverless-dynamo-client')

const docClient = dynamo.getClient({
  envPrefix: 'AWS_DDB',
  maxRetries: 3
})

getDocumentClient([options])

  • options {Object - shared options above or AWS.DynamoDB.DocumentClient standard options}

Method: dynamo.getDocumentClient

Creates an AWS.DynamoDB.DocumentClient with provided options.

var dynamo = require('serverless-dynamo-client')

const docClient = dynamo.getDocumentClient({
  convertEmptyValues: true
})

Contribute

PRs accepted. Note that code uses standard styling.

License

MIT © Dan Caddigan

About

🚀 Wrapper around the official dynamoDB client that plays well with serverless-offline

Topics

awsaws-dynamodbdynamodbserverlessserverless-offline

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.