This package has been deprecated

Author message:

stop using this library. use a recent aws-sdk library instead. note that you will need to stop looking at the .data property of return values

aws-sdk-promise

0.0.2 • Public • Published

aws-sdk-promise

Hack for adding the .promise() method to all aws-sdk request objects (aws-sdk is a peerDependency).

How it works?

Take a look at the source the short version its a terrible hack into the AWS.Request object (which aws-sdk returns from just about all api calls).

Usage

// AWS is identical to aws-sdk but it has .promise method on all
// requests
var AWS = require('aws-sdk-promise');
var ec2 = new AWS.EC2({ region: 'us-west-2' });
 
ec2.describeAccountAttributes({}).promise().then(
  function(req) {
    // the promise is resolved on the 'complete' event of request object
    console.log(JSON.stringify(req.data, null, 2));
  },
  function(error) {
    // rejected if the 'complete' event contains an error
    console.log(error);
  }
);
 

Credit: https://github.com/aws/aws-sdk-js/issues/13#issuecomment-11868232

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.0
    0

Package Sidebar

Install

npm i aws-sdk-promise

Weekly Downloads

14

Version

0.0.2

License

MIT

Last publish

Collaborators

  • jwhitlock
  • bsieber
  • pmoore
  • taskcluster-bot
  • jonasfj