Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Obtain AWS credentials
- AWS.config.getCredentials((error: AWSError) => {
- if (error) {
- throw new Error('Could not authenticate');
- } else {
- log('No error');
- }
- });
- const credentials = AWS.config.credentials;
- let opts = {
- host: 'e42s7iz1y2.execute-api.us-east-1.amazonaws.com/Alpha',
- path: path,
- aws_region: 'us-east-1',
- headers: {
- 'Content-Type': 'application/json',
- 'Authorization': ''
- }
- };
- log('signing now');
- aws4.sign(opts, credentials);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement