aws-v4-sign-small

1.1.1 • Public • Published

aws-v4-sign-small

Size optimized library to perform AWS V4 request signing designed for use in the browser. Forked from aws4

NPM

Installation

npm install --save aws-v4-sign-small

Usage

via browserify/require

var aws4 = require('aws-v4-sign-small')
var opts = {
  host: 'sqs.us-east-1.amazonaws.com',
  path: '/'
  query: '?Action=ListQueues'
}
 
var keys = {accessKeyId: 'access_key_here', secretAccessKey: 'secret_here'}
aws4.sign(opts, keys)
console.log('signed options: ', opts)

globally in browser

<script src="dist/aws-v4-sign-small.min.js"></script>
<script>
var aws4 = require('aws-v4-sign-small')
var opts = {
  host: 'sqs.us-east-1.amazonaws.com',
  path: '/'
  query: '?Action=ListQueues'
}
 
var keys = {accessKeyId: 'access_key_here', secretAccessKey: 'secret_here'}
aws4.sign(opts, keys)
console.log('signed options: ', opts)
</script>

Testing

AWS_ACCESS_KEY=access_key_here AWS_SECRET_ACCESS_KEY=secret_here npm run test

Attributions

This project is uses source code from aws4 by Michael Hart. Some dependencies are changed to make the package smaller when using in the browser. Some of the utility functions in aws4 have been dropped as well to keep the size down

Readme

Keywords

none

Package Sidebar

Install

npm i aws-v4-sign-small

Weekly Downloads

68

Version

1.1.1

License

ISC

Last publish

Collaborators

  • nisaacson