Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         // Obtain AWS credentials
  2.         AWS.config.getCredentials((error: AWSError) => {
  3.             if (error) {
  4.                 throw new Error('Could not authenticate');
  5.             } else {
  6.                 log('No error');
  7.             }
  8.         });
  9.  
  10.         const credentials = AWS.config.credentials;
  11.  
  12.         let opts = {
  13.             host: 'e42s7iz1y2.execute-api.us-east-1.amazonaws.com/Alpha',
  14.             path: path,
  15.             aws_region: 'us-east-1',
  16.             headers: {
  17.                 'Content-Type': 'application/json',
  18.                 'Authorization': ''
  19.             }
  20.         };
  21.  
  22.         log('signing now');        
  23.         aws4.sign(opts, credentials);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement