2 Answers
- Newest
- Most votes
- Most comments
0
The issue was that I was using 64 characters long string as the session id, I changed it to be 32 characters and it works.
answered a year ago
0
This error typically occurs due to permission issues when Lex tries to access Bedrock through the SDK. Here's how to troubleshoot and fix it:
- Check IAM Role for Lex: Ensure the IAM role associated with your Lex bot has the necessary permissions to invoke Bedrock.
- Verify Service Role: Make sure Lex's service role is properly configured
- If Lex and Bedrock are in different AWS accounts, ensure proper cross-account role settings are in place.
- When making the SDK call, ensure you're: a) Using the correct region b) Using credentials with proper permissions c) Properly configuring the SDK client

Thank you for your answer, I don't think the permissions is the issue as I tried sending the API request using postman using the same credentials I am using with the SDK and it worked with both intents, also the SDK request worked with the fixed responses intent but not with the bedrock agent one, although the error message indicating its a permission issue, which confuses me.