Skip to content

Commit 0231a9f

Browse files
burdeazymarcojahn
andauthored
Update s3-lambda-agentcore/deploy.tf
Co-authored-by: Marco <marco.jahn@gmail.com>
1 parent 65300e0 commit 0231a9f

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

s3-lambda-agentcore/deploy.tf

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,22 @@ statement {
7878
]
7979
}
8080
statement {
81-
actions = [
82-
"s3:GetObject",
83-
"s3:ListBucket"
84-
]
85-
effect = "Allow"
86-
resources = ["*"]
87-
}
81+
actions = [
82+
"s3:GetObject"
83+
]
84+
effect = "Allow"
85+
resources = [
86+
"${aws_s3_bucket.input_bucket.arn}/*"
87+
]
88+
}
89+
statement {
90+
actions = [
91+
"s3:ListBucket"
92+
]
93+
effect = "Allow"
94+
resources = [
95+
aws_s3_bucket.input_bucket.arn
96+
]
8897
}
8998

9099
resource "aws_iam_role" "agentcore_role" {

0 commit comments

Comments
 (0)