Skip to content

Commit d02e87d

Browse files
committed
fix(kb): Permissions error creating Bedrock KB
As mentioned in #19, Permissions changed by #16 are now insufficient for successful Bedrock Knowledge Base creation. Reverting the change for now and adding an explanatory note. We could look in to other ways to potentially tighten this permission later?
1 parent 6b1efe1 commit d02e87d

File tree

1 file changed

+6
-8
lines changed
  • infra/modules/knowledge-base

1 file changed

+6
-8
lines changed

infra/modules/knowledge-base/main.tf

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ resource "aws_iam_role_policy" "bedrock_kb_sample_kb_model" {
77
Version = "2012-10-17"
88
Statement = [
99
{
10+
# We'd like to scope this down further, but many of the individual AOSS IAM actions don't
11+
# support resource-level permissions, so currently using this all-inclusive one (as
12+
# recommended by Bedrock User Guide). See:
13+
# - https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonopensearchserverless.html
14+
# - https://docs.aws.amazon.com/bedrock/latest/userguide/kb-permissions.html#kb-permissions-oss
1015
Action = [
11-
"aoss:CreateIndex",
12-
"aoss:DescribeIndex",
13-
"aoss:UpdateIndex",
14-
"aoss:DeleteIndex",
15-
"aoss:WriteDocument",
16-
"aoss:ReadDocument",
17-
"aoss:SearchDocument",
18-
"aoss:DeleteDocument"
16+
"aoss:APIAccessAll",
1917
]
2018
Effect = "Allow"
2119
Resource = [var.opensearch_arn]

0 commit comments

Comments
 (0)