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

aws-signature

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-signature

Module to calculate aws signature

  • 1.0.0-rc1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

aws-signature

This project serves utility functions to calculate aws version 4 signature to do AWS_IAM authorisation.

Installation

npm i aws-signature -S

How to import

import {signRequest} from aws-signature

const signedRequest = signRequest({
            service: 'execute-api',
            region: 'us-east-1',
            endpoint: 'http://localhost/foo/bar?q=foo',
            method: 'PUT',
            contentType: 'application/json',
            body: {
                sample: 'sampleJsonBody'
            },
            headers: {
                'x-api-key': 'wkjfnkw8efwnef'
            },
            credentials: {
                accessKeyId: 'foo',
                secretAccessKey: 'bar',
                sessonToken: 'foobar'
            }
        });

const headers = signedRequest['headers']; // contains signature headers

Keywords

FAQs

Package last updated on 13 Aug 2019

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