I am trying to limit access of an IAM user to only 3 buckets.I'm working to create an IAM policy on AWS that enables the IAM user to sync files onto and from AWS S3. I have written the following policy out but every time I run an aws sync
command to sync a folder on the desktop with the bucket my policy allows access to, the terminal seems to get stuck without outputting any response or completing the process.
Any ideas on what permissions might be missing for the same?
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:ListBucket",
"s3:DeleteObject",
"s3:GetBucketLocation"
],
"Resource": [
"arn:aws:s3:::bucket-1",
"arn:aws:s3:::bucket-2",
"arn:aws:s3:::bucket-3"
]
}
]
}