aws-samples / aws-samples/bedrock-kb-rag-workshop

Error when creating knowledge base

Open
#1 3 comments 3 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
66
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Getting this error when i tried creating knowledge base

Failed to generate Amazon Opensearch Serverless vector database: Policy json is invalid, error: [$[0].Principal[1]: does not match the regex pattern ^saml/[0-9]{12}/[a-z][a-z0-9-]+/(user|group)/.{1,60}$, $[0].Principal[1]: does not match the regex pattern ^arn:(?:aws|aws-cn|aws-us-gov):iam::\d{12}:(user|role)(/[\w+=,.@-]+)*/[\w+=,.@-]{1,64}$, $[0].Principal[1]: does not match the regex pattern ^arn:(?:aws|aws-cn|aws-us-gov):sts::\d{12}:assumed-role/[\w+=,.@-]{1,64}/([\w+=,.@-]{2,64}|[\w+=,.@-]{0,63}\*)$]

The knowledge base storage configuration provided is invalid... Request failed: [security_exception] all shards failed

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the knowledge base storage configuration and the Amazon OpenSearch Serverless policy named in the error. Check the Principal value against the policy patterns in the report and reproduce knowledge base creation; done means creation succeeds without the invalid-policy or all-shards-failed errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, elasticsearch
Domain
cloud, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.