[aws-cli]S3バケット間のsync

LINEで送る
Pocket

  • コピー元のバケットからアクセス制限 > バケットポリシー
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "DelegateS3Access",
            "Effect": "Allow",
            "Principal": {
                "AWS": "xxxxxxxxxxxxxxx"
            },
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::adachin-test/*",
                "arn:aws:s3:::adachin-test"
            ]
        }
    ]
}
  • シンク
aws s3 sync --exact-timestamps s3://adachin-old s3://adachin-new --dryrun

aws s3 sync --exact-timestamps s3://adachin-old s3://adachin-new

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *