title: Deny access to user agent to access a bucket in AWS S3
body: <p>In my S3 logs I see multiple requests from NSPlayer and all the requests are like below:</p>
  
  <blockquote>
    <p>[29/Feb/2016:23:07:27 +0000] 188.71.221.62 - 07231C9924A44C67
    REST.GET.OBJECT 16639/tracks/7ed00e05502aeb383d8a1abde2.mp3</p>
    
    <p>"GET /bucket/16639/tracks/7ed00e05502aeb383d8a1abde2.mp3 HTTP/1.1" 200
    - 4122705 5639543 6305 58</p>
    
    <p>"<a href="http://m.xxxxxxw.com" rel="nofollow">http://m.xxxxxxw.com</a> /" "NSPlayer/12.00.9651.0000
    WMFSDK/12.00.9651.0000" -</p>
  </blockquote>
  
  <p>I want to deny access to this useragent and I have written the bucket policy as well as the user policy to deny the access. However, still the access is not getting denied. Could you please help me to figure out why its happening?</p>
  
  <p>Here is the bucket policy:</p>
  
  <pre><code>{
      "Version": "2012-10-17",
      "Statement": [
          {
              "Sid": "Stmtxxxxxxxxx0",
              "Effect": "Allow",
              "Principal": {
                  "AWS": "arn:aws:iam::xxxxxxxx3:user/bucket"
              },
              "Action": "s3:*",
              "Resource": "arn:aws:s3:::bucket/*",
              "Condition": {
                  "StringNotLike": {
                      "aws:UserAgent": "NSPlayer"
                  }
              }
          }
      ]
  }
  </code></pre>
  
  <p>Please let me know how to fix this!</p>