AWS Lex and Bedrock ChatBot

1

****I followed the guide listed below to create try to create a ChatBot using Lex, Bedrock and S3. I was able to create the S3 bucket, Bedrock KB, and the initial Lex Bot. When I try to add the KB to built in QnAIntent I get the following error:

*An error occurred 1 validation error detected: Value at 'qnAIntentConfiguration.dataSourceConfiguration.bedrockKnowledgeStoreConfiguration.bedrockKnowledgeBaseArn' failed to satisfy constraint: Member must satisfy regular expression pattern: ^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,40}:[0-9]{12}:knowledge-base/[A-Za-z0-9]{10}$|^[A-Za-z0-9]{10}$ * When I enter the KnowledgeBase ID, I get the following populated Associated ARN:

arn:aws:bedrock:us-east-1:[object Promise]:knowledge-base/EABEWRTQBT

Looking at the other ARNs in other examples, this doesn't seem to look right with the object promise. I've tried creating a new KB and pointing the QnAIntent to the new KB but still get the same error.

Thank you in advance.

  • Thanks to Monica below for pointing me to the documentation.

    In an effort to help others - here is what I used in CloudShell in order to update the QnAIntent:

    aws lexv2-models update-intent \
      --bot-id <your-bot-id> \
      --bot-version DRAFT \
      --locale-id <your-locale-id> \
      --intent-id <your-intent-id> \
      --intent-name <your-intent-name> \
      --description "Updated QnA intent with Bedrock KB" \
      --parent-intent-signature "AMAZON.QnAIntent" \
      --qn-a-intent-configuration '{
        "dataSourceConfiguration": {
          "bedrockKnowledgeStoreConfiguration": {
            "bedrockKnowledgeBaseArn": "arn:aws:bedrock:<your-region>:<your-account-id>:knowledge-base/<your-knowledge-base-id>"
          }
        },
        "bedrockModelConfiguration": {
          "modelArn": "arn:aws:bedrock:<your-region>::foundation-model/anthropic.claude-3-haiku-20240307-v1:0"
        }
      }'
    
  • @Brandon_M_Dev thank you for the sample CloudShell code. This worked for me. For those newer to CLI, since the command is to update the intent, you would need to first create a blank intent either from a separate CLI command or through the console. Once the intent is created, use the intent-id and intent-name from the newly created intent to populate the command provided by Brandon.

    Thanks!

asked 11 days ago339 views
7 Answers
0

I understand that you are facing an issue in which putting the Bedrock ID into the QnA intent was leading to the Associated ARN to be filled with an ARN that was missing the account ID, instead it was showing "[object Promise]" in it's place.

This error is due to a known issue in the Lex console as per 12th May 2025. The AWS team has raised this issue with the internal team and are working on it , as it appears to be a problem with the console's API in retrieving the ARN for Bedrock.

However, there is a workaround so that you can easily continue to create your QnA intents for any new bots you make, or when you need to update your bot. This is solely a console issue so using the CLI or any API will be able to get around this. for example, please see below steps I used for the CLI to update my QnA intent with a Bedrock Knowledge Base successfully -


(1) Create the QnA intent for your Lex bot in the console, but do not make any changes in the console for the QnA configuration

(2) You can use the CLI command below to update it - https://docs.aws.amazon.com/cli/latest/reference/lexv2-models/update-intent.html

I hope the above information helps!

If you still face any issues, kindly reach out to the AWS support team for further clarifications.

profile picture
answered 11 days ago
AWS
SUPPORT ENGINEER
revised 7 days ago
  • I got the same Error today (08/05/2025) and the AI solution provided by AWS did not help

  • The steps look right for me

  • A lot of people have reported the exact same issue, and it still hasn’t been resolved. From what I can see, this appears to be a UI bug—most likely due to the ARN field being auto-filled incorrectly. Would really appreciate an update or workaround.

0

arn:aws:bedrock:us-east-1:[object Promise]:knowledge-base/EABEWRTQBT

When you paste the knowledge base id, there should be account no in place of Object promise which will be auto populater, can you retrace your steps on what you did to get the value?

answered 10 days ago
  • The steps look right for me too, still get teh error . Summary of what I did:

    Environment: AWS Console (UI) Region: us-east-1 (N. Virginia) User Role: Not root, but has AdministratorAccess permissions

    Steps Taken: I created a Knowledge Base in Amazon Bedrock, while logged in as a non-root user with admin privileges.

    I created a Lex V2 bot with Gen AI support (same region, same user role).

    Inside Lex, under the QnAIntent (Gen AI), I selected the option: “Knowledge base for Amazon Bedrock ID”.

    I then pasted my Knowledge Base ID: KJGADUGFA.

    Immediately after pasting the ID, the following ARN auto-populated: arn:aws:bedrock:us-east-1:[object Promise]:knowledge-base/KJGADUGFA

0

I understand that you are facing an issue in which putting the Bedrock ID into the QnA intent was leading to the Associated ARN to be filled with an ARN that was missing the account ID, instead it was showing "[object Promise]" in it's place.

This error is due to a known issue in the Lex console as per 12th May 2025. The AWS team has raised this issue with the internal team and are working on it , as it appears to be a problem with the console's API in retrieving the ARN for Bedrock.

However, there is a workaround so that you can easily continue to create your QnA intents for any new bots you make, or when you need to update your bot. This is solely a console issue so using the CLI or any API will be able to get around this. for example, please see below steps I used for the CLI to update my QnA intent with a Bedrock Knowledge Base successfully -

(1) Create the QnA intent for your Lex bot in the console, but do not make any changes in the console for the QnA configuration

(2) You can use the CLI command below to update it - https://docs.aws.amazon.com/cli/latest/reference/lexv2-models/update-intent.html

I hope the above information helps!

If you still face any issues, kindly reach out to the AWS support team for further clarifications.

AWS
SUPPORT ENGINEER
answered 7 days ago
  • Hi Monika,

    Many thanks for your efforts there. I think the CLI solution will get a lot of people out of trouble who are CLI au fait. But many of us are not CLI people so please continue to stress to the team that we still deperately need a fix to the console version. Thanks again.

0

I've the same problem. 8 days ago I follow the same tutorial to create a chatbot but no problem accours.

answered 9 days ago
0

I got the same error. Is there anyone who can solve it?

An error occurred 1 validation error detected: Value at 'qnAIntentConfiguration.dataSourceConfiguration.bedrockKnowledgeStoreConfiguration.bedrockKnowledgeBaseArn' failed to satisfy constraint: Member must satisfy regular expression pattern: ^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,40}:[0-9]{12}:knowledge-base/[A-Za-z0-9]{10}$|^[A-Za-z0-9]{10}$

answered 9 days ago
0

I'm getting this too. Very weird because I am following a tutorial that I used 2 weeks ago and everything worked fine that time. Now doing exactly the same thing and getting this [object promise] in the auto generated ARN for the intent. Frustrating because you can't edit the auto generated ARN to fix it.

AWS please help - I'm desperate now

answered 9 days ago
0

I also got the same error last Friday (9th May) and then again this morning which is quite annoying.

I know others have already pointed out the issue with the malformed ARN (where the account ID shows as [object Promise], but I also noticed a Content Security Policy (CSP) violation in the browser console that might be contributing to or explain why required scrips aren't loading properly. Here's the error I'm seeing:

Refused to load the script 'https://ap-southeast-2.console.aws.amazon.com/lexv2/mode-mode.js' because it violates the following Content Security Policy directive: "script-src ..."

It looks like the mode-mode.js script, which could be responsible for resolving or rending parts of the form, is being blocked by the current CSP rules. This might explain why the Bedrock Knowledge Base ARN isn't loading correctly in the UI.

Just wanted to flag this in case it helps the AWS team narrow it down. Happy to provide full console logs or repro steps if needed.

Cheers,

Brandon

answered 7 days 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.

Guidelines for Answering Questions