其他分享
首页 > 其他分享> > S3 Cross Account Access 跨账户访问

S3 Cross Account Access 跨账户访问

作者:互联网

进入S3对应的存储桶,上面选项选权限,存储桶策略 -- 编辑,输入对应的policy。

完全控制,包含上传删除权限,policy如下:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "cross",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::123456789:root"
            },
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::bucket",
                "arn:aws:s3:::bucket/*"
            ]
        }
    ]
}

只读权限policy:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::123456789:root"
            },
            "Action": "S3:ListBucket",
            "Resource": "arn:aws:s3:::bucket",
            "Condition": {}
        },
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::123456789:root"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::bucket/*",
            "Condition": {}
        }
    ]
}


标签:Account,S3,bucket,aws,Cross,AWS,s3,arn
来源: https://blog.51cto.com/helpdesk/2675787