s3创建多桶权限

DevOps AWS评论3,529字数 1064阅读3分32秒阅读模式

s3创建多桶权限

配置策略

 

s3创建多桶权限

 

{
    "Version": "2012-10-17",
    "Id": "ExamplePolicy01",
    "Statement": [
        {
            "Sid": "ExampleStatement01",
            "Effect": "Allow",
            "Action": [
                "s3:getBucketVersioning",
                "s3:ListAllMyBuckets",
                "s3:GetAccountPublicAccessBlock",
                "s3:GetBucketPublicAccessBlock",
                "s3:GetBucketPolicyStatus",
                "s3:GetBucketAcl",
                "s3:ListAccessPoints"
            ],
            "Resource": [
                "arn:aws:s3:::*"
            ]
        },
        {
            "Sid": "statement1",
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:PutObject",
                "s3:GetObject",
                "s3:DeleteObject"
            ],
            "Resource": [
                "arn:aws:s3:::media.pplingo.com",
                "arn:aws:s3:::media.pplingo.com/*",
                "arn:aws:s3:::stage.media.pplingo.com",
                "arn:aws:s3:::stage.media.pplingo.com/*",
                "arn:aws:s3:::dev.media.pplingo.com",
                "arn:aws:s3:::dev.media.pplingo.com/*",
                "arn:aws:s3:::test.media.pplingo.com",
                "arn:aws:s3:::test.media.pplingo.com/*"
            ]
        }
    ]
}

保存策略

s3创建多桶权限

创建用户

s3创建多桶权限

s3创建多桶权限添加s3策略

s3创建多桶权限s3创建多桶权限

创建完成后,使用这个用户的key即可。

  • 有个php服务,不知道是啥权限限制,使用这个策略解决报错问题。
只限制s3桶权限


{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:*",
                "s3-object-lambda:*"
            ],
            "Resource":
                "arn:aws:s3:::media.1.com",
                "arn:aws:s3:::media.1.com/*",
                "arn:aws:s3:::stage.media.1.com",
                "arn:aws:s3:::stage.media.1/*
             ]
        }
    ]
}

继续阅读
AWS最后更新:2023-3-14
DevOps
  • 本文由 发表于 2022年7月29日 18:13:40
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
S3迁移到另一个S3 AWS

S3迁移到另一个S3

部署AWS CLI客户端 curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unz...
S3迁移到另一个S3 AWS

S3迁移到另一个S3

部署AWS CLI客户端 curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unz...
评论  0  访客  0

发表评论