Skip to content

Size optimized library to perform AWS V4 request signing designed for use in the browser

Notifications You must be signed in to change notification settings

nisaacson/aws-v4-sign-small

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Size optimized library to perform AWS V4 request signing designed for use in the browser

Resources

Stars

Watchers

Forks

Packages

No packages published