S3跨帐户复制不复制文件

问题描述 投票:0回答:1

我具有以下配置,并且我已经尝试了很多东西。有人可以说一句可能是什么问题吗?我已将源的规范帐户添加到目标存储桶。在源存储桶上启用了复制。正在复制整个存储桶。

源存储桶。

    "Version": "2012-10-17",
    "Id": "PutObjPolicy",
    "Statement": [
        {
            "Sid": "DenyUnEncryptedObjectUploads",
            "Effect": "Deny",
            "Principal": "*",
            "Action": "s3:PutObject",
            "Resource": "arn:aws:s3:::source-bucket/*",
            "Condition": {
                "Null": {
                    "s3:x-amz-server-side-encryption": "true"
                }
            }
        },
        {
            "Sid": "AWSSourcebucketWrite20131101",
            "Effect": "Allow",
            "Principal": {
                "AWS": [
                    "arn:aws:iam::external_account_who_write_the_files:root",
                    "arn:aws:iam::external_account_who_write_the_files:root",
                    "arn:aws:iam::external_account_who_write_the_files:root"
                ]
            },
            "Action": "s3:PutObject",
            "Resource": "arn:aws:s3:::source-bucket/*",
            "Condition": {
                "StringEquals": {
                    "s3:x-amz-acl": "bucket-owner-full-control"
                }
            }
        }
    ]
}

目的地桶

{
    "Version": "2012-10-17",
    "Id": "PutObjPolicy",
    "Statement": [
        {
            "Sid": "DenyUnEncryptedObjectUploads",
            "Effect": "Deny",
            "Principal": "*",
            "Action": "s3:PutObject",
            "Resource": "arn:aws:s3:::source-bucket-replication/*",
            "Condition": {
                "Null": {
                    "s3:x-amz-server-side-encryption": "true"
                },
                "Bool": {
                    "aws:SecureTransport": "true"
                }
            }
        },
        {
            "Sid": "Stmt123",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::source_bucket_account:root"
            },
            "Action": [
                "s3:ReplicateObject",
                "s3:ReplicateDelete"
            ],
            "Resource": "arn:aws:s3:::source-bucket-replication/*",
            "Condition": {
                "Bool": {
                    "aws:SecureTransport": "true"
                }
            }
        }
    ]
}
amazon-web-services amazon-s3 replication amazon-iam
1个回答
0
投票

您是否尝试过将新文件添加到源存储桶?还是更新源存储桶中的现有文件?我认为复制仅对启用复制后添加或更新的项目有效。

© www.soinside.com 2019 - 2024. All rights reserved.