- Newest
- Most votes
- Most comments
Hi!
I would verify that the runtime IAM Role that you're passing when creating the Knowledge Base has the correct permissions for the embeddings model and region that you're using.
In my case, I had auto-generated the role in us-east-1, then tried switching to a different model using the same role and ran into the error above. I then tried switching regions and ran into the same problem. After checking the auto-generated permissions it had a policy that looked like this:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "BedrockInvokeModelStatement",
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel"
],
"Resource": [
"arn:aws:bedrock:us-east-1::foundation-model/amazon.titan-embed-text-v2:0"
]
}
]
}
The simplest and quickest fix would be to auto-generate another role when you create the new knowledge base. It should add the right permissions for what you're trying to do.
In my case I added entries for us-west-2 and the other model I was attempting to use. It worked after that.
If it still doesn't work - make sure you're verifying the permissions on the other policies that reference the OpenSearch collection and buckets.
Hope that helps!
Same model. I checked the existing role I'm reusing and the model ARN appears to match the Titan Embed v2 model I selected to use for vector db. I did notice my OSS Collection ARN was missing in the policy, but even adding it didn't change this specific error (i imagine missing the OSS Collection ARN would have thrown a new error further down the authentication workflow if I hadn't added it)

I have actually been getting the exact same error, same behavior as well with the OpenSearch Collection being created and then failing to create the Knowledge Base itself. I opened a support case for it and would be happy to share any solutions or insights I might get from AWS support. For now, they are still investigating.
Absolutely! Would be super helpful if you update your findings here :)
No new information, just here to say that I observed the exact same behavior with the roles and policies.