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

aws-sdk-wrap

Package Overview
Dependencies
Maintainers
1
Versions
252
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-sdk-wrap

Wrapper around aws-sdk

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
417
decreased by-49.27%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status Test Coverage Dependabot Status Dependencies NPM Downloads Semantic-Release Gardener

AWS SDK Wrap

Wrapper around aws-sdk.

Why

When dealing with the aws-sdk a lot, some calls become very repetitive and achieving code coverage becomes tiresome. This wrapper abstracts some of the repetitive logic.

Some examples of repetitive logic are:

  • having to call .promise()
  • handling of expected errors
  • logging of unexpected errors

Install

Install with npm:

$ npm install --save aws-sdk-wrap

Ensure required peer dependencies are available.

Usage

const aws = require('aws-sdk-wrap')();

aws
  .call("s3", "putObject", { /* ... */ })
  .then(/* ... */)
  .catch(/* ... */);

where the first parameter is the service, the second parameter is the method and the third parameter are the "params" passed into the call.

Services are lazily initialized on first access.

Init Options

logger

Type: Logger
Default: null

Provide logger. E.g. logplease or lambda-rollbar.

When an unexpected error is risen, information is logged using .error(...).

config

Type: Object
Default: {}

AWS Config object used to initialize the service.

Call Options

expectedErrorCodes

Type: list
Default: []

Provide string list of expected AWS error codes. Promise succeeds on expected error with error code as string.

Keywords

FAQs

Package last updated on 21 Aug 2018

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