title: RAmazonS3 connection authentication issue - HTTP/1.1 403 Forbidden
body: <p>I'm trying to use the <code>listBuckets</code> function from the <a href="https://github.com/duncantl/RAmazonS3" rel="nofollow">RAmazonS3 package</a> but getting <code>HTTP/1.1 403 Forbidden</code>.</p>
  
  <p>First I'm setting the authentication options as described in <a href="http://www.omegahat.org/RAmazonS3/s3amazon.pdf" rel="nofollow">the manual</a>:</p>
  
  <pre><code>options(AmazonS3 = c('login' = 'secret'))
  </code></pre>
  
  <p>I replaced <code>login</code> with my access key ID (20 characters), and <code>secret</code> with my secret access key (40 characters).  When I run <code>listBuckets()</code>, I get the following error:</p>
  
  <pre><code>Error in UseMethod("xmlSApply") : 
    no applicable method for 'xmlSApply' applied to an object of class "NULL"
  </code></pre>
  
  <p>It's not returning any data, so it must not be connecting properly.  Digging into it, there is a <code>getURL</code> call within <code>listBuckets</code>.  The output of that line is:</p>
  
  <pre><code>* About to connect() to proxy proxyname.domain.com port xx (#0)
  *   Trying xxx.xxx.xxx.xxx... * connected
  * Connected to proxyname.domain.com (xxx.xxx.xxx.xxx) port xx (#0)
  &gt; GET http://s3.amazonaws.com HTTP/1.1
  Host: s3.amazonaws.com
  Accept: */*
  Proxy-Connection: Keep-Alive
  Date: Fri, 12 Sep 2014 09:02:41 EDT
  Authorization: AWS [login]:[unknown 27-character code]=
  
  &lt; HTTP/1.1 403 Forbidden
  &lt; x-amz-request-id: [unknown 16-character code]
  &lt; x-amz-id-2: [unknown 64-character code]
  &lt; Content-Type: application/xml
  &lt; Transfer-Encoding: chunked
  &lt; Date: Fri, 12 Sep 2014 13:02:40 GMT
  &lt; Server: AmazonS3
  &lt; Cache-Control: proxy-revalidate
  &lt; Proxy-Connection: Keep-Alive
  &lt; Connection: Keep-Alive
  &lt; 
  * Connection #0 to host proxyname.domain.com left intact
  </code></pre>
  
  <p><strong>Any ideas where I'm going wrong?</strong></p>
  
  <p>I'm not sure what value to use for <code>login</code>, so I've also tried my AWS account name, my AWS account user name, and literally 'login', but get a similar error.</p>
  
  <p>Before finding the RAmazonS3 package, I was starting to write my own S3api functions using the <a href="http://aws.amazon.com/cli/" rel="nofollow">AWS Command Line Interface</a>.  I was able to successfully list the buckets and their objects when calling the AWS CLI from R.</p>
  
  <pre><code>sessionInfo()
  R version 3.1.1 (2014-07-10)
  Platform: x86_64-w64-mingw32/x64 (64-bit)
  
  locale:
  [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
  [5] LC_TIME=English_United States.1252    
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] RCurl_1.95-4.3  bitops_1.0-6    RAmazonS3_0.1-5
  
  loaded via a namespace (and not attached):
  [1] digest_0.6.4 tools_3.1.1  XML_3.98-1.1
  </code></pre>