-1

I am trying the below function just to see the fulfillment of the amazon lex using lambda, but it says callback is not a function.

'use strict';

module.exports.intent =(event, callback) => {
 callback(null, {
   dialogAction:{
    type:"Close",
    FulfilmentStatement:"fulfilled ",
    message:{
      contextType:"PlaintText",
      content:"your deadline is today"
  }
 }
 
  } );
};
Nimantha
  • 6,405
  • 6
  • 28
  • 69

1 Answers1

1

Please read the documentation on the expected function signature of the JavaScript/Node Lambda handler: https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html#nodejs-handler-sync

The second argument is not the callback function. It is the "context". The callback function is supposed to be the third parameter.

httpdigest
  • 5,411
  • 2
  • 14
  • 28