Cross account Lexv2 from connect flow get customer input block

0

I have aws connect setup on one account and aws lex v2 bot setup on another account. I want to use lex bot of second account in aws connect flow of the first account.

I've added resource based policy on lex account and granted lex permission in connect account.

Both AWS accounts are in same region. and ARN based access to lex account in get customer input block of connect account replaces the account id in ARN in cloud watch debug log.

1 Answer
0

To use an Amazon Lex V2 bot from a different AWS account in your Amazon Connect flow, you'll need to follow these steps:

  1. First, ensure that you have the necessary cross-account permissions set up. The Amazon Connect account will need permission to access and use the Lex V2 bot in the other account.

  2. In your Amazon Connect flow, add a "Get customer input" block.

  3. When configuring the "Get customer input" block, select the Amazon Lex tab.

  4. Instead of selecting a bot from the dropdown menu (which would only show bots in the same account), you'll need to use the bot's ARN (Amazon Resource Name) from the other account.

  5. To set this up, choose the option to dynamically set the bot. This allows you to specify the ARN of the cross-account Lex V2 bot.

  6. You'll need to provide the full ARN of the Lex V2 bot from the other account. This ARN should include the bot name, alias, and the account ID where the bot resides.

  7. Make sure that the language attribute in Amazon Connect matches the language model used to build the Lex V2 bot in the other account.

  8. Configure the rest of the "Get customer input" block as you normally would, including setting up intents, prompts, and other necessary parameters.

Remember that when using a cross-account setup, you may need to take extra care in managing permissions and ensuring that any updates to the Lex bot in the other account don't unexpectedly impact your Connect flow. Also, make sure to test the integration thoroughly to ensure smooth operation across the accounts.

By following these steps, you should be able to use your Lex V2 bot from the second account in your Amazon Connect flow in the first account.

Sources
Create a flow and add your conversational AI bot - Amazon Connect
Use Amazon Lex and attribute values - Amazon Connect

profile picture
answered 6 days ago
  • On Lex Account. i've added Resource based policy on bot alias { "Sid": "AllowCrossAccountConnectUsage", "Effect": "Allow", "Principal": { "Service": "connect.amazonaws.com" }, "Action": [ "lex:" ], "Resource": "arn:aws:lex:us-east-1:LEXACCOUNTID:bot-alias/NYAMUOPP9Z/MEO37UXBJ8", "Condition": { "StringEquals": { "AWS:SourceAccount": "CONNECTACCOUNTID" }, "ArnLike": { "AWS:SourceArn": "arn:aws:connect:us-east-1:CONNECTACCOUNTID:instance/" } } }

    Do i need to setup any permission on connect account. The connect account is able to use lex within the same account using bot alias ARN, but when i change ARN to other account it does not works and log shows replaced accountid to own account id

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