Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to resolve Authorizations errors when running lab 03_QuestionAnswering/02_qa_w_rag_claude_opensearch #189

Open
GAcharyaOS opened this issue Feb 7, 2024 · 1 comment

Comments

@GAcharyaOS
Copy link

When running this lab, you will encounter permissions error in the following steps :

  1. The cell trying to create vector store using Opensearch serverless
  2. Step / cell to inject the documents into vector store.
  3. Clean-up step

To resolve permission issue # 1 and # 3 above, attach following inline policy to the IAM SageMaker execution role you used to launch the SageMaker studio and re-run the cells.

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"aoss:CreateSecurityPolicy",
"aoss:UpdateSecurityPolicy",
"aoss:CreateCollection",
"aoss:ListCollections",
"aoss:CreateAccessPolicy",
"aoss:APIAccessAll",
"aoss:DeleteSecurityPolicy",
"aoss:DeleteCollection",
"aoss:DeleteAccessPolicy"
],
"Resource": ""
},
{
"Effect": "Allow",
"Action": "iam:CreateServiceLinkedRole",
"Resource": "arn:aws:iam::
:role/aws-service-role/observability.aoss.amazonaws.com/AWSServiceRoleForAmazonOpenSearchServerless"
}
]
}

The permission error in the # 2 above ("Step / cell to inject the documents into vector store. ") is more of a sporadic and timing issue. It is caused because its executed before the index creation is completed in the OpenSearch cluster. Re-run this after a min or two delay, and it should run without error.

@w601sxs
Copy link
Contributor

w601sxs commented Apr 9, 2024

will test - cc: @mani-aiml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants