Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nisaacson/aws-v4-sign-small
Size optimized library to perform AWS V4 request signing designed for use in the browser
https://github.com/nisaacson/aws-v4-sign-small
Last synced: 7 days ago
JSON representation
Size optimized library to perform AWS V4 request signing designed for use in the browser
- Host: GitHub
- URL: https://github.com/nisaacson/aws-v4-sign-small
- Owner: nisaacson
- Created: 2015-11-29T18:47:56.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-28T20:13:51.000Z (almost 8 years ago)
- Last Synced: 2024-10-31T14:25:43.399Z (14 days ago)
- Language: JavaScript
- Size: 38.1 KB
- Stars: 19
- Watchers: 2
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aws-v4-sign-small
Size optimized library to perform AWS V4 request signing designed for use in the browser. Forked from [aws4](https://github.com/mhart/aws4)
[![NPM](https://nodei.co/npm/aws-v4-sign-small.png)](https://nodei.co/npm/aws-v4-sign-small/)
# Installation
```
npm install --save aws-v4-sign-small
```# Usage
## via browserify/require
```js
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
```js
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)```
# Testing
```sh
AWS_ACCESS_KEY=access_key_here AWS_SECRET_ACCESS_KEY=secret_here npm run test
```# Attributions
This project is uses source code from [aws4](https://github.com/mhart/aws4) by [Michael Hart](https://github.com/mhart). 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