0

I am trying to create access for a user to be able to upload and download to a specific bucket in s3 on amazon's AWS console. Currently my code limits access to the other buckets in s3 but they can still view the other buckets. I would like to restrict view and access of these other buckets so that they can only see and access the buckets I allow them.

{
"Version": "2012-10-17",
"Statement": [
    {
        "Effect": "Allow",
        "Action": [
            "s3:ListAllMyBuckets"
        ],
        "Resource": "arn:aws:s3:::*"
    },
    {
        "Effect": "Allow",
        "Action": [
            "s3:ListBucket",
            "s3:GetBucketLocation"
        ],
        "Resource": [
            "arn:aws:s3:::My_Bucket",
            "arn:aws:s3:::My_Bucket_Uploaded"
        ]
    },
    {
        "Effect": "Allow",
        "Action": [
            "s3:PutObject",
            "s3:GetObject",
            "s3:DeleteObject"
        ],
        "Resource": [
            "arn:aws:s3:::My_Bucket/*",
            "arn:aws:s3:::My_Bucket_uploaded/*"
        ]
    }
]
}
Acfarris1
  • 25
  • 5

1 Answers1

0

Your question seems to have already been answered here.

TLDR; You can't limit listing to a subset of your buckets. You either use API and know you bucket's name in advance or allow users to see all bucket names on console, although their privileges in each one may be restricted as you wish.

Community
  • 1
  • 1
Edson Marquezani Filho
  • 2,436
  • 1
  • 14
  • 18
  • is it possible to restrict the region access to the buckets. lets say I only want to allow access to buckets located in North California. – Acfarris1 Aug 10 '15 at 21:39