I'm trying to give a user from another AWS account access to the bucket itv-twitterstg-archive
and I've added the following bucket policy. They say they are getting a permission denied message. Can anyone see any issues with this policy or recommend anything else I can try? (ps, I've changed the name of the bucket for this example). Also should a buckets policy come into effect as soon as you save it?
EDIT** To summarise, I want the user twitterstg-backup from account AWS account 456456615374 to be able to perform these actions:
"s3:GetObject*"
"s3:PutObject"
"s3:PutObjectAcl"
"s3:DeleteObject"
"s3:GetBucketLocation"
"s3:GetBucketAcl"
"s3:ListBucket"
.
{
"Version": "2012-10-17",
"Id": "twitterstg backup policy",
"Statement": [
{
"Sid": "Allow read/write of Objects within archive from specific user",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::456456615374:user/twitterstg-backup"
},
"Action": [
"s3:GetObject*",
"s3:PutObject",
"s3:PutObjectAcl",
"s3:DeleteObject"
],
"Resource": "arn:aws:s3:::itv-twitterstg-archive/*"
},
{
"Sid": "Allow read/list of archive Bucket from specific user",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::456456615374:user/twitterstg-backup"
},
"Action": [
"s3:GetBucketLocation",
"s3:GetBucketAcl",
"s3:ListBucket"
],
"Resource": "arn:aws:s3:::itv-twitterstg-archive"
}
]
}