File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,11 @@ resource "aws_iam_policy" "bedrock_permissions" {
1111 " bedrock:InvokeModel" ,
1212 " bedrock:InvokeModelWithResponseStream"
1313 ]
14- Resource = " *"
14+ Resource = [
15+ " arn:aws:bedrock:${ data . aws_region . current . name } ::foundation-model/anthropic.*" ,
16+ " arn:aws:bedrock:${ data . aws_region . current . name } ::foundation-model/amazon.*" ,
17+ " arn:aws:bedrock:${ data . aws_region . current . name } ::foundation-model/meta.*"
18+ ]
1519 }
1620 ]
1721 })
@@ -100,7 +104,9 @@ resource "aws_iam_policy" "monitoring_permissions" {
100104 " xray:GetSamplingRules" ,
101105 " xray:GetSamplingTargets"
102106 ]
103- Resource = " *"
107+ Resource = [
108+ " arn:aws:xray:${ data . aws_region . current . name } :${ data . aws_caller_identity . current . account_id } :trace/*"
109+ ]
104110 },
105111 {
106112 Effect = " Allow"
Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ resource "aws_iam_role_policy" "bedrock_kb_sample_kb_model" {
77 Version = " 2012-10-17"
88 Statement = [
99 {
10- Action = [" aoss:*" ]
10+ Action = [
11+ " aoss:APIAccessAll" ,
12+ " aoss:DashboardsAccessAll"
13+ ]
1114 Effect = " Allow"
1215 Resource = [var.opensearch_arn]
1316 },
You can’t perform that action at this time.
0 commit comments