aws-simple-request

1.0.2 • Public • Published

aws-simple-request


npm install aws-simple-request

Example Use:

const awsApi = require('aws-simple-request');

// assuming your credentials are passed in via process.env
let awsReq = new awsApi.awsRequest(process.env.secretKey, process.env.keyId, process.env.associateTag);
// make the request
awsReq.makeRequest('webservices.amazon.de',  '/onca/xml', {
      "Operation": "ItemSearch",
      "SearchIndex": "Books",
      "Service":"AWSECommerceService",
      "Title": "Node.js"
    }, function (err, response, body) {
      if(err) throw err;
      console.log(body);
      done();
});

Documentation:

Class: awsRequest


awsRequest.constructor(secretKey, keyId, associateTag)

Parameters

  • secretKey: string, aws secret access key. Should look like 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'
  • keyId: string, aws access key id. The Identifier for your Key. Should look like 'AKIAIOSFODNN7EXAMPLE'
  • associateTag: string, AssociateTag Parameter

More Information: docs.aws.amazon.com


awsRequest.makeRequest(endpoint, path, params, callback)

Parameters

  • endpoint: string, amazon host. For Example: 'webservices.amazon.de'
  • path: string, For Example: '/onca/xml'
  • params: object, object which attributes should conform aws docs.
  • callback: function, function that get called with (error, response, body)

More Information docs.aws.amazon.com


Readme

Keywords

none

Package Sidebar

Install

npm i aws-simple-request

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • anselmstordeur