-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Describe the bug
I tried to invoke the AWS Bedrock Agent by using boto3 package. The code snippet was really simple, but it prompted me this error botocore.exceptions.EventStreamError: An error occurred (accessDeniedException) when calling the InvokeAgent operation: Bedrock was unable to assume the specified role. Provide necessary permissions to Bedrock and retry the request.
After I changed the value of inputText parameter from Unicode to Ascii format, the issue was solved. But this was not consistent. Please refer to the snapshots samples
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
I expect it to return the response from Bedrock Agent similar to the one I tested in AWS Console
Current Behavior
Please trace back to the Describe the bug section. I included every detail log snapshot
Reproduction Steps
- Use Python version 3.10.12 in WSL2
- Packages used detail
- Codebase was captured in the above screenshot
Possible Solution
Currently I am still finding a solution because my input is plain Vietnamese. But through some sample use cases as described above, I do not think decoding the unicode value is the right solution
Additional Information/Context
No response
SDK version used
1.40.62
Environment details (OS name and version, etc.)
WSL2 in Window