title: Reading large JSON files from S3 in RStudio EC2 instance (Louis Aslett's AMI)
body: <p>I am going through a similar issue as this question <a href="https://stackoverflow.com/questions/24891861/trouble-uploading-large-files-to-rstudio-using-louis-asletts-ami-on-ec2/38156494#38156494">here</a>:</p>
  
  <p>I have a big JSON file on AWS S3 and am trying to access it via RStudio (EC2 instance from Louis Aslett's AMI). 
  I have even tried moving from t2 to r4.xlarge with 30GB of memory but to no avail:
  I receive errors:</p>
  
  <blockquote>
    <p>Error in writeBin(httr::content(r, as = "raw"), con = file) :    long
    vectors not supported yet: connections.c:4147</p>
  </blockquote>
  
  <p>If I use the free tier instance then it gives me the error: </p>
  
  <blockquote>
    <p>Error in curl::curl_fetch_memory(url, handle = handle) :    Failed
    writing body (0 != 16360)</p>
  </blockquote>
  
  <p>It seems that the question that I mentioned in the reference has figured out a way to do it, though I am not able to follow it completely. Can someone please explain a little when they say that the directory needs to be something else than "home". How do you implement it? Because there is no permission to do that in Louis AMI. 
  The question may be very basic but I am getting out of my wits here. </p>
  
  <p>Cheers!
  A  </p>