title: Restrict user access to Single S3 Bucket using Amazon IAM?
body: <p>When you work with the team, you might want to restrict an access to a single S3 bucket to specific users.  How can I achieve this?</p>
  
  <p>The following code is not working. The user still has full permission.</p>
  
  <pre><code>{
      "Version": "2012-10-17",
      "Statement": [
          {
              "Effect": "Allow",
              "Action": "s3:ListAllMyBuckets",
              "Resource": "arn:aws:s3:::*"
          },
          {
              "Effect": "Allow",
              "Action": "s3:*",
              "Resource": [
                  "arn:aws:s3:::Privatebacket",
                  "arn:aws:s3:::Privatebacket/*"
              ]
          }
      ]
  }
  </code></pre>