简体   繁体   中英

Getting error when trying to setup Amazon S3 bucket policy

I'm trying to transfer an S3 bucket to another since a developer is leaving our team. I created another AWS account with S3. I'm following these steps: https://aws.amazon.com/premiumsupport/knowledge-center/account-transfer-s3/

The Bucket policy in for source AWS account works fine, but when I try the destination policy:

{
     "Version": "2012-10-17",
     "Statement": {
          "Effect": "Allow",
          "Action": "s3:*",
          "Resource": [
               "arn:aws:s3:::sourcebucket",
               "arn:aws:s3:::sourcebucket/*",
               "arn:aws:s3:::destinationbucket",
               "arn:aws:s3:::destinationbucket/*"
          ]
     }
}

And update only the sourcebucket and dest bucket items above with my account details, I get the error: Statement is missing required element - Statement "NO_ID-0" is missing "Principal" element

The destination policy in the article you cited is not a bucket policy. It's an IAM user or group policy.

Note the comment:

#User or group policy in the destination AWS account

This policy attaches to an IAM user or group in the IAM (as opposed to S3) console.

The source policy actually is a bucket policy, which is why it works as expected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM