(I'm a rank beginner - looking for some pointers/guidance from the gurus here)
I am trying to write a Lambda to call a Phone number and initiate a simple Connect call-flow. Here is the code I am trying and errors I am getting. Any suggestions?
Sample Lambda Code for calling Connect API
I am using a Default Outbound Callflow (AWS built in callflow) configured for outbound call
Here is the error I am getting when I do a standalone Lambda test
Response: null Request ID: "e83a6066-f670-11e8-afa4-47dc77991dc5" Function Logs: b/sequential_executor.js:105:20) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14) at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10) at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12) at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10 at Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9) at Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12) message: null, code: 'ContactNotFoundException', time: 2018-12-02T20:29:04.509Z, requestId: 'e925d29c-f670-11e8-b5a4-53c4ecc6b5ed', statusCode: 410, retryable: false, retryDelay: 81.20336569510724 } 'ContactNotFoundException: null\n at Object.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:48:27)\n at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/rest_json.js:52:8)\n at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20)\n at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10)\n at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)\n at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)\n at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)\n at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10\n at Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)\n at Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)' 2018-12-02T20:29:04.666Z e83a6066-f670-11e8-afa4-47dc77991dc5 { InvalidParameterException: ContactFlow type is invalid at Object.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:48:27) at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/rest_json.js:52:8) at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14) at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10) at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12) at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10 at Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9) at Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12) message: 'ContactFlow type is invalid', code: 'InvalidParameterException', time: 2018-12-02T20:29:04.629Z, requestId: 'e92b01e8-f670-11e8-8b54-4549dfd0957e', statusCode: 400, retryable: false, retryDelay: 19.48408234110566 } 'InvalidParameterException: ContactFlow type is invalid\n at Object.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:48:27)\n at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/rest_json.js:52:8)\n at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20)\n at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10)\n at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)\n at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)\n at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)\n at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10\n at Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)\n at Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)' END RequestId: e83a6066-f670-11e8-afa4-47dc77991dc5 REPORT RequestId: e83a6066-f670-11e8-afa4-47dc77991dc5 Duration: 1275.08 ms Billed Duration: 1300 ms Memory Size: 128 MB Max Memory Used: 33 MB