aws-lambdaslack-apiamazon-lex

AWS Lex integration with Slack and Twilio question


My question is not about how to set up the integration, but rather about the data that these integrations provide to LEX. I was testing Slack integration and the use of Lambda function as backend for Lex. I was printing out the full event that Lambda function receives from Lex. I was hoping that Lex woudl be provided with the identifiable information about who is talking to Lex, like the Slack user that is talking to Lex. But no, other than the fact that it's a Slack integration, there was no information about who is talking to Lex. Did I miss or misconfigured something?

And one more question. Does Twilio integration actually provide such information?

This is the only information I have that the conversation is over Slack: 'requestAttributes': { 'x-amz-lex:channels:platform': 'Slack' },


Solution

  • After actually testing Twilio integration channel I discovered that in the event code, sessionId is the incoming phone number. No other Twilio information is passed, but at least the number is available.