Skip to content

Instantly share code, notes, and snippets.

@Arunmainthan
Created December 18, 2019 23:15
Show Gist options
  • Save Arunmainthan/18016247494ee9091374db65463aa118 to your computer and use it in GitHub Desktop.
Save Arunmainthan/18016247494ee9091374db65463aa118 to your computer and use it in GitHub Desktop.
Generate AWS signature to call API Gateway end point
var aws4 = require('aws4');
var signature = aws4.sign({
host: '',
method: 'GET',
path: '/development/hello',
headers: {
'x-apigw-api-id': ''
},
region: 'ap-southeast-2',
service: 'execute-api'
}, {
secretAccessKey: "",
accessKeyId: "",
sessionToken: ""
});
console.log('signature: ', signature);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment