Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Creating an Amazon Lex V2 bot for Amazon Chime SDK messaging

Focus mode
Creating an Amazon Lex V2 bot for Amazon Chime SDK messaging - Amazon Chime SDK

To use AppInstance bots as agents, you first need to create an Amazon Lex V2 bot to manage the dialog interaction for an intelligent-agent scenario. To get started building an Amazon Lex V2 bot, see Getting Started with Amazon Lex V2 in the Amazon Lex V2 Developer Guide. For information about migrating an Amazon Lex V1 bot to Amazon Lex V2, see the Amazon Lex V1 to V2 migration guide.

Prerequisites

Your Amazon Lex V2 bot must have the following prerequisites.

  • You must create the bot in an AWS Region that supports Amazon Lex V2 runtime endpoints.

  • You must create the bot in the same AWS account and Region as the AppInstance and AppInstanceBot.

  • The bot must grant invocation permissions via a resource-based policy to the messaging.chime.amazonaws.com service principal.

  • The bot can model a Welcome Intent. This allows AppInstanceBot to announce itself and its capabilities upon membership in a channel.

  • The bot should have a production version and aliases in order to configure the AppInstanceBot.

  • The bot must use a supported language and locale. For more information about languages and locales, see Languages and locales supported in Amazon Lex V2 in the Amazon Lex V2 Developer Guide.

Granting invocation permissions

For an AppInstanceBot to invoke an Amazon Lex V2 Bot, the Amazon Chime SDK messaging service principal must have permission to invoke the Amazon Lex Bot resource. For more information about Amazon Lex V2 resource-based policy permissions, see Resource-based policy examples for Amazon Lex V2 in the Amazon Lex V2 Developer Guide.

The following example shows a resource-based policy.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "messaging.chime.amazonaws.com" }, "Action": [ "lex:PutSession", "lex:DeleteSession", "lex:RecognizeText" ], "Resource": "arn:aws:lex:region:aws-account-id:bot-alias/lex-bot-id/lex-bot-alias-id", "Condition": { "StringEquals": { "AWS:SourceAccount": "aws-account-id" }, "ArnEquals": { "AWS:SourceArn": "arn:aws:chime:region:aws-account-id:app-instance/app-instance-id/bot/app-instance-bot-id" } } } ] }
Note

To allow one AppInstanceBot to invoke an Amazon Lex V2 bot, use the AppInstanceBot's ID. To allow all AppInstanceBots within an AppInstance to invoke an Amazon Lex V2 bot, use a wildcard. For example:

arn:aws:chime:region:aws-account-id:app-instance/app-instance-id/bot/*

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.