Skip to content

Amazon Connect + Lex V2 (Spanish Bot) – ResourceNotFoundException when invoked from Contact Flow

0

Hi everyone,

We’re currently facing an issue integrating an Amazon Lex V2 bot with an Amazon Connect contact flow.

The integration works correctly when using the English version of the bot, but when switching to the Spanish version, we consistently receive a ResourceNotFoundException.

This seems similar to a few discussions we’ve seen before (Related case), but we haven’t been able to pinpoint the root cause yet.

Environment details:

  • Region: us-east-1
  • Amazon Connect instance: (same region as Lex)
  • Contact flow: Spanish version of an existing working flow
  • Lex V2 bot: Published and using a specific alias (Spanish version)
  • Amazon Connect Wisdom / AI agent also configured and attached
  • Nova Suported voice: Lupe (supported voices)

Observed behavior / Logs:

When the flow reaches the GetUserInput block (configured with the Spanish Lex bot), we get:

ErrorCode: BadRequestException
Message: Service returned error code ResourceNotFoundException 
(Service: LexRuntimeV2, Status Code: 404)

What we’ve verified so far:

  • The Lex bot alias exists and is published in the console was created inside the Conversational AI tab in Flows of the Connect console
  • IAM roles used by Amazon Connect have permissions for Lex and Wisdom
  • All services (Connect, Lex, Wisdom) are in the same region
  • The Lex Bot locale Spanish (US) (Built Language)
  • The Lex Bot Speech model: Speech-to-Speech: Amazon Nova Sonic
  • The AI agent is properly published and associated
  • The AI Agent locale Spanish (US)
  • The same flow works correctly when switching to an English Lex bot (with a different voice), so the issue seems isolated to the Spanish bot configuration

Question:

Has anyone experienced something similar when invoking a Lex V2 bot (especially in a different language) from an Amazon Connect flow?

We’re trying to understand what could cause a ResourceNotFoundException in this scenario, even though the bot alias exists and is deployed.

Any guidance, ideas, or things we might be overlooking would be greatly appreciated. Thanks in advance!

1 Answer
0

A ResourceNotFoundException encountered when invoking a Lex V2 Spanish bot typically related to a configuration mismatch involving the bot alias, locale, or region. Although the alias may exist, Connect requires the precise published alias and corresponding locale (for example, es_US) to be correctly referenced. Each locale must be explicitly created, published, and associated with the alias before it can be invoked by Connect.

https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html

https://repost.aws/questions/QUDup8L7zfQJuSsUrXi-lWJg/amazon-lex-and-connect-language-spanish-us

https://awscli.amazonaws.com/v2/documentation/api/2.1.29/reference/lexv2-models/create-bot-locale.html

EXPERT
answered 2 months 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.