S3 object copy from cross account

Photo by CHUTTERSNAP on Unsplash

S3 object copy from cross account

AWS/Cross Account

  • outline

You can upload or download object from cross account S3 bucket.

  • how-to

Source Account

  • Have S3 full access

Destination Account

  • S3 bucket policy
{
    "Version": "2008-10-17",
    "Id": "PolicyForCloudFrontPrivateContent",
    "Statement": [
        {
            "Sid": "AllowYamiAccess",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::<source-aws-account>:root"
            },
            "Action": [
                "s3:ListBucket",
                "s3:GetObject",
                "S3:PutObject"
            ],
            "Resource": [
                "arn:aws:s3:::<destination-bucket>",
                "arn:aws:s3:::<destination-bucket>/*"
            ]
        }
    ]
}