Skip to content

Node.js utility to generate an AWS HMAC signature

License

Notifications You must be signed in to change notification settings

ramhiser/aws-hmac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-hmac

A small Node.js utility to generate an HMAC signature to authorize AWS API requests.

For more details about signing AWS requests, see the AWS docs.

Special thanks to Robert Kehoe for providing a clear example from which this utility is derived.

Installation

npm install aws-hmac --save

Usage

aws_access_id = "ramhiser"
aws_secret_key = "FLUFFY BUNNIES"

var aws_hmac = require("aws-hmac");
aws_signature = aws_hmac.generate_signature(aws_access_id, aws_secret_key);
console.log(aws_signature);

/*
{ Date: 'Sat, 02 Apr 2016 03:33:17 GMT',
  'X-Amzn-Authorization': 'AWS3-HTTPS
  AWSAccessKeyId=ramhiser,Algorithm=HMACSHA256,Signature=OIPTkauadMhOOTWJsoKcFMv7jAldNOz45pCDwYegmKI=' }
*/

Tests

npm test

License

The aws-hmac module is licensed under the MIT License and is freely available for commercial and non-commerical usage. Please consult the licensing terms in the LICENSE file for more details.

About

Node.js utility to generate an AWS HMAC signature

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published