How do I troubleshoot Amazon Lex integration failures in my Amazon Connect instance?

5 minute read
0

I want to integrate Amazon Lex bots into my contact workflows, but it's not working.

Short description

The following are the most common reasons why integrating Amazon Lex bots into contact workflows might fail:

  • The resource quota is exceeded.
  • You're not able to associate the Amazon Lex V2 bot using the AWS Command Line Interface (AWS CLI).
  • You're trying to access AWS Lex in Amazon Connect.
  • Amazon Lex intent isn't identified in contact flows, or the customer input isn't recognized.
  • The Amazon Lex session times out.
  • The contact flow is running the error flow.

Resolution

To troubleshoot Amazon Lex integration with Amazon Connect, first validate whether the Amazon Lex bot works independently. For example, confirm that it works on the Amazon Lex console. This helps you to determine whether the issue comes from the underlying Amazon Lex bot or from Amazon Connect.

Next, activate the flow logs and Amazon Lex conversation logs to troubleshoot other integration issues.

Finally, troubleshoot the most common reasons why integrating Amazon Lex bots into contact workflows might fail.

The resource quota is exceeded

You get the following error message: "Resource quota exceeded."

This is because you've exceeded the limit on at least one of the following Amazon Connect services:

  • The Amazon Lex bots per instance default quota is 70. To support more than 70 Amazon Lex bots, migrate to Amazon Lex V2. For more information, see Amazon Lex V1 to V2 migration guide.
  • The Amazon Lex V2 bot aliases per instance default is 100.
  • The Amazon Lex bot integration chat timeout is 6 seconds. This is the maximum time in which the Amazon Lex bot must respond to the customer's chat prompt. This number can't be increased.

For more information, see Amazon Connect service quotas.

You're not able to associate the Amazon Lex V2 bot using the AWS CLI

The AWS CLI associate-lex-bot doesn't work with Amazon Lex V2, but the AWS CLI associate-bot does work for both Amazon Lex V1 and Amazon Lex V2. Therefore, if you're using Amazon Lex V2, then use the AWS CLI associate-bot.

Note: If you receive errors when running AWS Command Line Interface (AWS CLI) commands, make sure that you’re using the most recent AWS CLI version.

You're trying to access AWS Lex in Amazon Connect

Cross-account access isn't supported. Amazon Connect and the Amazon Lex bot must be in the same AWS account for the integration to work. However, the Amazon Lex bot can be in a different AWS Region.

Note: It's a best practice to have your Amazon Lex bot in the same Region as the connect instance. If you use an Amazon Lex bot from another Region, then it might result in a suboptimal performance.

Amazon Lex intent isn't identified in contact flows, or the customer input isn't recognized

If you're using Amazon Lex V2, then make sure that you set the correct Language Attribute. It's a best practice to use the set Voice block in your Contact Flow. Place it in front of the Get User input block. For example, if your Amazon Lex bot is in the en,GB locale, then set the language in the set Voice block to English, British. Then, on the set Voice block, turn on set language attribute.

Important: For Amazon Lex V2 bots, your language attribute in Amazon Connect must match the language model that's used to build your Amazon Lex bot. This is different from Amazon Lex V1. Use a set voice block to indicate the Amazon Connect language model, or use a set contact attributes block.

The Amazon Lex session times out

When you configure time-out values for voice contacts, make sure that you use the appropriate session attributes in the Get customer input block that calls your Amazon Lex bot. For more information on controlling the time-out functionality, see Configuration tips.

The contact flow is running the error flow

Make sure that you provide an alias for your Amazon Lex bot that matches the alias provided in the mandatory Get Customer Input field of your contact flow.

Important: Make sure that the Amazon Lex bot is associated with the correct alias in the Instance Contact Flow. Also, make sure that the alias corresponds to the correct version of the alias you intend to use for your Amazon Lex bot.

If you still have issues after completing the preceding steps, then contact AWS Support. For instructions on how to access AWS Support, see Get administrative support for Amazon Connect.

It's a best practice to provide the following information with your ticket:

  • Your contact center instance ID/ARN. To find your instance ARN, see Find your Amazon Connect instance ID/ARN.
  • A detailed description of the issue.
  • Any error messages that you receive.
  • Screenshots of the error.
  • Contact flow logs, if applicable.

AWS OFFICIAL
AWS OFFICIALUpdated a year ago