title: Http 403 error bottlenose python (Amazon API)
body: <p>I am trying to access data using Amazon's API. I created product advertisement and aws account with same email and password, got the aws_secret, aws_key and affiliate_associate_key. </p>
  
  <p>Then, I tried the following:</p>
  
  <pre><code>import bottlenose
  aws_key = 'my_aws_key'
  aws_secret = 'my_aws_secret' 
  aws_associate_tag = 'my_aws_associate_tag'
  
  amazon = bottlenose.Amazon(aws_key, aws_secret, aws_associate_tag)
  product = amazon.lookup(ItemId='B00EOE0WKQ')
  </code></pre>
  
  <p>And, I get the HTTP 403 error as follows (I added some print statement in my urllib2.py file):</p>
  
  <pre><code>message from urllib2.py Forbidden
  headers from urllib2.py Date: Sun, 21 Aug 2016 05:44:59 GMT
  Server: Apache-Coyote/1.1
  Vary: Accept-Encoding,User-Agent
  Content-Encoding: gzip
  Content-Length: 304
  Keep-Alive: timeout=2, max=15
  Connection: Keep-Alive
  
  code from urllib2.py 403
  ---------------------------------------------------------------------------
  HTTPError                                 Traceback (most recent call last)
  &lt;ipython-input-1-973306797553&gt; in &lt;module&gt;()
        5 
        6 amazon = bottlenose.Amazon(aws_key, aws_secret, aws_associate_tag)
  ----&gt; 7 product = amazon.lookup(ItemId='B00EOE0WKQ')
        8 
  
  /Users/chaitra/anaconda/lib/python2.7/site-packages/bottlenose/api.pyc in __call__(self, **kwargs)
      263         # make the actual API call
      264         response = self._call_api(api_url,
  --&gt; 265                                   {'api_url': api_url, 'cache_url': cache_url})
      266 
      267         # decompress the response if need be
  
  /Users/chaitra/anaconda/lib/python2.7/site-packages/bottlenose/api.pyc in _call_api(self, api_url, err_env)
      224                 else:
      225                     # the simple way
  --&gt; 226                     return urllib2.urlopen(api_request, timeout=self.Timeout)
      227             except:
      228                 if not self.ErrorHandler:
  
  /Users/chaitra/anaconda/lib/python2.7/urllib2.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)
      152     else:
      153         opener = _opener
  --&gt; 154     return opener.open(url, data, timeout)
      155 
      156 def install_opener(opener):
  
  /Users/chaitra/anaconda/lib/python2.7/urllib2.py in open(self, fullurl, data, timeout)
      438         for processor in self.process_response.get(protocol, []):
      439             meth = getattr(processor, meth_name)
  --&gt; 440             response = meth(req, response)
      441 
      442         return response
  
  /Users/chaitra/anaconda/lib/python2.7/urllib2.py in http_response(self, request, response)
      551         if not (200 &lt;= code &lt; 300):
      552             response = self.parent.error(
  --&gt; 553                 'http', request, response, code, msg, hdrs)
      554 
      555         return response
  
  /Users/chaitra/anaconda/lib/python2.7/urllib2.py in error(self, proto, *args)
      476         if http_err:
      477             args = (dict, 'default', 'http_error_default') + orig_args
  --&gt; 478             return self._call_chain(*args)
      479 
      480 # XXX probably also want an abstract factory that knows when it makes
  
  /Users/chaitra/anaconda/lib/python2.7/urllib2.py in _call_chain(self, chain, kind, meth_name, *args)
      410             func = getattr(handler, meth_name)
      411 
  --&gt; 412             result = func(*args)
      413             if result is not None:
      414                 return result
  
  /Users/chaitra/anaconda/lib/python2.7/urllib2.py in http_error_default(self, req, fp, code, msg, hdrs)
      559 class HTTPDefaultErrorHandler(BaseHandler):
      560     def http_error_default(self, req, fp, code, msg, hdrs):
  --&gt; 561         raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
      562 
      563 class HTTPRedirectHandler(BaseHandler):
  
  HTTPError: HTTP Error 403: Forbidden
  </code></pre>
  
  <p><em>Things tried:</em></p>
  
  <ul>
  <li>I made sure that all the keys and the associate_tag are infact from the same account. </li>
  <li>I also synced clock on my machine (which was in Central timezone) to sync to N.California timezone. </li>
  <li>I have made around 5 requests in over an hour. </li>
  </ul>
  
  <p>I am using Python v 2.7.11 and running this code using Anaconda's QtConsole on my machine locally. </p>