title: How do I have an S3 bucket return 404 (instead of 403) for a key that does not exist in the bucket/
body: <p>I am using S3 to store some business critical documents. I want the bucket to return a 404 status code when trying to access an object that does not exist in the bucket.</p>
  
  <p>However, I am finding that it keeps on returning me "403 </p>
  
  <p>here is an example of a session using the S3 website url.</p>
  
  <pre><code>&gt; GET /foobar.txt HTTP/1.1
  &gt; User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
  &gt; Host: &lt;bucketname&gt;.s3-website-us-east-1.amazonaws.com
  &gt; Accept: */*
  &gt; 
  &lt; HTTP/1.1 403 Forbidden
  &lt; Last-Modified: Mon, 09 Sep 2013 19:10:28 GMT
  &lt; ETag: "14e13b81b3ce5b129d1f206b3e514885"
  &lt; x-amz-error-code: AccessDenied
  &lt; x-amz-error-message: Access Denied
  &lt; x-amz-request-id: &lt;snip&gt;
  &lt; x-amz-id-2: &lt;snip&gt;
  &lt; Content-Type: text/html
  &lt; Content-Length: 11
  &lt; Date: Thu, 26 Sep 2013 20:01:45 GMT
  &lt; Server: AmazonS3
  &lt; 
  Not found!
  </code></pre>
  
  <p>Note, the "Not Found!" string is coming from the error document set on the bucket properties when enabling S3 website hosting.</p>
  
  <p>I have also tried accessing using the bucket url directly </p>
  
  <blockquote>
    <p>http://.s3.amazonaws.com/</p>
  </blockquote>
  
  <p>and that returns the same, except that instead of the error document, I get a XML document</p>
  
  <p>How do I solve this problem?</p>