A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.npmjs.com/package/superagent-aws-signed-request below:

superagent-aws-signed-request - npm

superagent-aws-signed-request1.0.5 • Public • Published 7 years ago

superagent-aws-signed-request

Superagent plugin that intercepts and signs the request with AWS Signature V4

Usage Params Supported Aws Services

To find the appropriate service name to use, a helpful resource is the Amazon Resource Names (ARNs) and AWS Service Namespaces page.

Note: Some services like API Gateway while having a namespace of apigateway, actually require you to pass execute-api if you are trying to make a request to the api hosted there. If you choose the wrong service name, an error should be returned with the service name you need, based on the service you are making a request to.

Example

const request = require('superagent');

const signRequest = require('superagent-aws-signed-request');

 

const awsService = 'execute-api'; 

return request

  .get()

  .use(signRequest(service, {

    key: 'AWS_ACCESS_KEY_ID', 

    secret: 'AWS_SECRET_ACCESS_KEY', 

    region: 'AWS_REGION', 

    sessionToken: 'sessionToken', 

  }))

  .then( resp => console.log(resp));

Install

It's available on npm so you can simply install it with:

npm install --save superagent-aws-signed-request
Package Sidebar Install

npm i superagent-aws-signed-request

Downloads Weekly Downloads Collaborators

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4