title: AWS-CLI credentials not found using RStudio, but works fine from Windows CLI
body: <p>When I issue an AWS-CLI command from the windows command line, <code>"aws s3 ls"</code> it successfully completes. When I try <code>shell(paste0("aws ", "s3 ", "ls"))</code> using R with Eclipse, it successfully completes.</p>
  
  <p>However, on another machine using the same credentials, from the windows command line, <code>"aws s3 ls"</code> successfully completes, but with RStudio <code>shell(paste0("aws ", "s3 ", "ls"))</code> I get:</p>
  
  <blockquote>
    <p>"fatal error: Unable to locate credentials"</p>
  </blockquote>
  
  <p>If I run <code>shell(paste0("aws ", "s3 ", "ls ", "--debug"))</code> from RStudio I get:</p>
  
  <blockquote>
    <p>2017-02-27 15:07:10,516 - MainThread - botocore.credentials - DEBUG -
    Looking for credentials via: env 2017-02-27 15:07:10,516 - MainThread
    - botocore.credentials - DEBUG - Looking for credentials via: assume-role 2017-02-27 15:07:10,516 - MainThread -
    botocore.credentials - DEBUG - Looking for credentials via:
    shared-credentials-file 2017-02-27 15:07:10,516 - MainThread -
    botocore.credentials - DEBUG - Looking for credentials via:
    config-file 2017-02-27 15:07:10,516 - MainThread -
    botocore.credentials - DEBUG - Looking for credentials via:
    ec2-credentials-file 2017-02-27 15:07:10,516 - MainThread -
    botocore.credentials - DEBUG - Looking for credentials via:
    boto-config 2017-02-27 15:07:10,516 - MainThread -
    botocore.credentials - DEBUG - Looking for credentials via:
    container-role 2017-02-27 15:07:10,516 - MainThread -
    botocore.credentials - DEBUG - Looking for credentials via: iam-role
    2017-02-27 15:07:10,520 - MainThread -
    botocore.vendored.requests.packages.urllib3.connectionpool - INFO -
    Starting new HTTP connection (1): xxx.xxx.xxx.xxx 2017-02-27
    15:07:10,523 - MainThread - botocore.utils - DEBUG - <strong>Caught exception
    while trying to retrieve credentials: ('Connection aborted.',
    error(10051, 'A socket operation was attempted to an unreachable
    network'))</strong> Traceback (most recent call last):   File
    "botocore\utils.pyc", line 159, in _get_request   File
    "botocore\vendored\requests\api.pyc", line 69, in get   File
    "botocore\vendored\requests\api.pyc", line 50, in request   File
    "botocore\vendored\requests\sessions.pyc", line 465, in request   File
    "botocore\vendored\requests\sessions.pyc", line 573, in send   File
    "botocore\vendored\requests\adapters.pyc", line 415, in send</p>
  </blockquote>
  
  <p>For the successful case from the Windows command line, it finds the credentials as seen below:</p>
  
  <blockquote>
    <p>2017-02-27 15:07:03,267 - MainThread - botocore.credentials - DEBUG -
    Looking for credentials via: env 2017-02-27 15:07:03,267 - MainThread
    - botocore.credentials - DEBUG - Looking for credentials via: assume-role 2017-02-27 15:07:03,267 - MainThread -
    botocore.credentials - DEBUG - Looking for credentials via:
    shared-credentials-file 2017-02-27 15:07:03,267 - MainThread -
    botocore.credentials - INFO - Found credentials in shared credentials
    file: ~/.aws/credentials</p>
  </blockquote>
  
  <p>So, what I am trying to figure out is why the AWS CLI cannot find the credentials using RStudio, but it works fine from the Windows CLI.</p>
  
  <p>UPDATE: I have installed Eclipse on both machines and it works fine. However, it is still not working with RStudio, so it must be an IDE-related issue. Any ideas?</p>