Skip to content

Amazon Connect - Lex issue

0

HI,

We ar eusing a Lex Chastbot in an Amazon Connect Contact Flow.

I can manage the Lex Bot from the Amazon Connect admin console

But when I test within a Contact Fllow I have the Error Messahre

"ErrorDetails": { "ErrorCode": "ResourceNotFoundException", "Message": "Service returned error code ResourceNotFoundException (Service: LexRuntimeV2, Status Code: 404, Request ID: 5fd5664a-5d75-40ad-9a13-fda92cb25398)"

Anything I should check?

2 Answers
0

There are a few things you should check to resolve this issue:

  1. Ensure that the Lex bot is properly associated with your Amazon Connect instance. You mentioned you can manage the Lex bot from the Amazon Connect admin console, which is a good start, but double-check that the association is correct.

  2. Verify that you're using the correct version and alias of the Lex bot in your Contact Flow. Make sure you've specified the right bot version and alias when configuring the "Get Customer Input" block.

  3. Check that the language settings in your Contact Flow match the language model used to build your Lex bot. This is a common cause of errors. Use the "Set Voice" block before the "Get Customer Input" block to ensure the language is set correctly.

  4. Confirm that the IAM permissions are set up correctly. Amazon Connect needs the proper permissions to invoke the Lex bot. When you associate a Lex bot with your Amazon Connect instance, the resource-based policy on the bot should be automatically updated to give Amazon Connect permission to invoke it.

  5. Validate that the Lex bot works independently by testing it directly in the Lex console. This can help determine if the issue is with the bot itself or the Connect integration.

  6. Check your AWS region settings. Ensure that your Lex bot and Amazon Connect instance are in the same AWS region.

  7. Review your Contact Flow design. Start with a simple flow to isolate the issue, then gradually add complexity.

If you've checked all these points and are still encountering the error, you may need to open a support case with AWS for further assistance. They can help diagnose any underlying issues that might not be immediately apparent.

Sources
Enable bot building and analytics in Amazon Connect - Amazon Connect
Struggling to get Lex v2 bot to work with Connect | AWS re:Post
Amazon Lex's intent is not identified in contact flows or customer information is not recognized | AWS re:Post

answered a year ago

0

That error is the Lex V2 runtime not finding a bot resource for the exact parameters Connect is sending at call time. Since you can manage and see the bot from the Connect console, the association itself is fine, so I'd focus on two things.

The most likely cause is that the language attribute in your flow doesn't match a locale that's actually built on the bot alias. Under the hood, Connect calls Lex V2 on a path that includes the locale (.../botAliases/{aliasId}/botLocales/{localeId}/...), and it picks that locale from the contact's language attribute, not from the locale you use to filter intents in the Get customer input block. So a bot built only in, say, English (GB) will fail if the flow is defaulting to English (US). A common trap here is using a Set voice block but not ticking the "Set the language attribute" box, which leaves it defaulting to en_US. Set the language attribute explicitly to a locale your bot is built in, and confirm that locale is actually built and enabled on the alias you're pointing at.

The second thing to rule out is a stale or wrong bot/alias reference. If the bot or alias was deleted and recreated, the alias ID changes, and a flow still pointing at the old one throws exactly this. Open the Get customer input block, re-select the bot and alias from the dropdowns, save, and re-publish the flow. While you're there, confirm the bot and the Connect instance are in the same region (they have to be for the association to work, but it's worth a glance).

Quickest way to confirm it's the locale: point the flow at a bot that has en_US built, or set the language attribute to match your existing bot's locale, and re-test. If it starts working, it was the language mismatch.

AWS

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.