S3存储桶架构和存储桶策略

时间:2019-05-16 05:08:19

标签: amazon-s3

我需要一个具有s3桶策略的s3桶,其中我们有N个PUSHERS(上传脚本)和1个PULLER(下载脚本)。pushers只能在共享存储桶中的那个键(对象)上读写PULLER可以读取/写入任何对象..puller的策略很简单..但是复杂性在于每个PUSHER只能访问其对象,而不能访问任何其他对象。

我试图创建两个组策略,并假设PULLERS和PUSHERS成为将成为USERS的用户。然后我们可以将它们附加到Group ..我也尝试合并一个存储桶策略,但是并没有工作得很好

S3桶政策:

{   “ Version”:“ 2012-10-17”,   “声明”:[       {              “ Sid”:“ AllowGroupToSeeBucketListInTheConsole”,              “ Action”:[“ s3:ListAllMyBuckets”,“ s3:GetBucketLocation”],              “效果”:“允许”,              “资源”:[“ arn:aws:s3 ::: ”]       },       {              “ Sid”:“ AllowRootAndHomeListingOfMonitoringBucket”,              “动作”:[“ s3:ListBucket”],              “效果”:“允许”,              “资源”:[“ arn:aws:s3 ::: $$ {aws_s3_bucket.service_bucket.id}”],              “条件”:{“ StringEquals”:{“ s3:prefix”:[“”,“ home /”],“ s3:delimiter”:[“ /”]}}       },       {              “ Sid”:“ AllowListingOfUserFolder”,              “动作”:[“ s3:ListBucket”],              “效果”:“允许”,              “资源”:[“ arn:aws:s3 ::: $$ {aws_s3_bucket.service_bucket.id}”],              “条件”:{“ StringLike”:{“ s3:prefix”:                          [“ home / $$ {aws:username} / ”,“ home / $$ {aws:username}”]]                         }       },       {               “ Sid”:“ AllowAllS3ActionsInUserFolder”,               “动作”:[“ s3:”],               “效果”:“允许”,               “资源”:[“ arn:aws:s3 ::: $ {aws_s3_bucket.service_bucket.id} / $$ {aws:username} / ”]       }     ] } 紧急行动 }

我的Terraform申请不适用于这种政策,并指出其格式有误

0 个答案:

没有答案