If you want to grant access to a specific User in another account, this is quite simple. (I do not think this method will work to provide access to another account .)
Say you have:
- A account with Bucket A that you own
- Account B with User B to whom you want to grant access
Request user B for ARN associated with their IAM user. This can be seen in the IAM management console, and it will look like this:
arn:aws:iam::123456789012:user/fred
Then add the Bucket Policy command to bucket A:
{ "Version": "2012-10-17", "Id": "S3AccessPolicy", "Statement": [ { "Sid": "GiveFredAccess", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::123456789012:user/fred" }, "Action": [ "s3:GetObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::bucket-a", "arn:aws:s3:::bucket-a/*" ] } ] }
This will allow Fred to access the S3 bucket. This works for users in one account and for users of another account.
source share