@salecycle/aws-api-gateway-fetch
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

aws-api-gateway-fetch

An npm library wraps the signature generation parts of calling an aws api gateway, allowing us to treat it like any other fetch.

Usage

const gateWayFetch = require('@salecycle/aws-api-gateway-fetch');
const result = await gateWayFetch.apiGatewayFetch(
  'http://targeturl,
    {
      accessKeyId: 'AWS_ACCESS_KEY_ID,
      region: 'AWS_REGION',
      secretAccessKey: 'AWS_SECRET_ACCESS_KEY',
      sessionToken: 'OPTIONAL_SECURITY_TOKEN_NEEDED_IF_A_TEMPORARY_KEY'
    }
);

apart from the call to the inital method everything else will work like a normal fetch

Development

built with

  • nodejs
  • typescript

non local requirements

  • yarn - brew install yarn

running locally

  • yarn - install packages
  • yarn build build the js outputs from the typescript inputs
  • yarn link It's a library so you will need to link it to something that uses it, but you need to link the js version, not the typescript version

Readme

Keywords

none

Package Sidebar

Install

npm i @salecycle/aws-api-gateway-fetch

Weekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

14 kB

Total Files

7

Last publish

Collaborators

  • npmsalecycleadmin
  • npm-deployers-salecycle
  • npm-users-salecycle