Advertisement
Guest User

Untitled

a guest
Apr 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. console.log('Loading function');
  2.  
  3. exports.handler = function(event, context, callback) {
  4.     //console.log('Received event:', JSON.stringify(event, null, 2));
  5.     console.log('value1 =', event.key1);
  6.     console.log('value2 =', event.key2);
  7.     console.log('value3 =', event.key3);
  8.     console.log('remaining time =', context.getRemainingTimeInMillis());
  9.     console.log('functionName =', context.functionName);
  10.     console.log('AWSrequestID =', context.awsRequestId);
  11.     console.log('logGroupName =', context.logGroupName);
  12.     console.log('logStreamName =', context.logStreamName);
  13.     console.log('clientContext =', context.clientContext);
  14.     if (typeof context.identity !== 'undefined') {
  15.         console.log('Cognito
  16.        identity ID =', context.identity.cognitoIdentityId);
  17.     }    
  18.     callback(null, event.key1); // Echo back the first key value
  19.     // or
  20.     // callback("some error type");
  21. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement