From 6322d29c94154f5b9bced9cc98013938b93aab65 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Wed, 12 Jun 2024 20:59:43 +0200 Subject: [PATCH] chore: add iam policy example for accessing folders in buckets --- .../iam.policies/access folder in bucket.json | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 examples/aws/iam.policies/access folder in bucket.json diff --git a/examples/aws/iam.policies/access folder in bucket.json b/examples/aws/iam.policies/access folder in bucket.json new file mode 100644 index 0000000..fce91d7 --- /dev/null +++ b/examples/aws/iam.policies/access folder in bucket.json @@ -0,0 +1,25 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "AllowAccessToTheBucket", + "Effect": "Allow", + "Action": [ + "s3:ListBucket" + ], + "Resource": [ + "arn:aws:s3:::backups-bucket" + ] + }, + { + "Sid": "AllowOperationsInTheDesignatedFolder", + "Effect": "Allow", + "Action": [ + "s3:*" + ], + "Resource": [ + "arn:aws:s3:::backups-bucket/prometheus/*" + ] + } + ] +}