Integrating an Amazon Lex V2 bot with a messaging platform - Amazon Lex

Integrating an Amazon Lex V2 bot with a messaging platform

This section explains how to integrate Amazon Lex V2 bots with the Facebook, Slack, and Twilio messaging platforms.

Note

When storing your Facebook, Slack, or Twilio configurations, Amazon Lex V2 uses an AWS KMS key to encrypt information. The first time that you create a channel to one of these messaging platforms, Amazon Lex V2 creates a default customer managed key (aws/lex) in your AWS account or you can select your own customer managed key. Amazon Lex V2 supports only symmetric keys. For more information, see the AWS Key Management Service Developer Guide.

When a messaging platform sends a request to Amazon Lex V2 it includes platform-specific information as a request attribute to you Lambda function. Use this attribute to customize the way that your bot behaves. For more information, see Setting request attributes.

Common request attribute
Attribute Description
x-amz-lex:channels:platform

One of the following values:

  • Facebook

  • Slack

  • Twilio