Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pwntus/sigv4
Tiny helper for performing necessary SigV4 steps to be used by a client
https://github.com/pwntus/sigv4
Last synced: 14 days ago
JSON representation
Tiny helper for performing necessary SigV4 steps to be used by a client
- Host: GitHub
- URL: https://github.com/pwntus/sigv4
- Owner: Pwntus
- License: mit
- Created: 2017-05-21T21:23:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-24T17:19:21.000Z (over 7 years ago)
- Last Synced: 2024-12-15T19:05:37.959Z (16 days ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sigv4
Tiny helper for performing necessary SigV4 steps to be used by a client.```javascript
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
})```