Skip to content
/ sigv4 Public

Tiny helper for performing necessary SigV4 steps to be used by a client

License

Notifications You must be signed in to change notification settings

Pwntus/sigv4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sigv4

Tiny helper for performing necessary SigV4 steps to be used by a client.

import axios from 'axios'
import SigV4 from 'sigv4'

const config = {
  
  // Required properties
  method: 'POST',
  path: '/dev/foo/bar',
  region: 'us-east-1',
  endpoint: 'https://123abc.execute-api.us-east-1.amazonaws.com',
  accessKey: 'X',
  secretKey: 'Y',
  sessionToken: 'Z',

  // Optional properties and their default values
  data: {},
  serviceName: 'execute-api',
  defaultAcceptType: 'application/json',
  defaultContentType: 'application/json'
}

const headers = SigV4(config)

axios({
  headers: headers,
  method: config.method,
  url: config.endpoint + config.path,
  data: data
})

About

Tiny helper for performing necessary SigV4 steps to be used by a client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published