numeract / aws-lambda-r

Using R on AWS Lambda
https://numeract.github.io/aws-lambda-r/
MIT License
51 stars 11 forks source link

Call resources from within the R script? #26

Open brorio opened 5 years ago

brorio commented 5 years ago

I assume that the R script in the Lambda has access to the AWS OS it's running on so theoretically it could use for example Clodyr's R library aws.s3 and fetch files from s3.

# get file as raw vector
get_object("mtcars.Rdata", bucket = "my_bucket")

Then you don't have to pass it thru Python and also you avoid rewriting your existing R code base. Or am I missing something? Is this not possible?

MikeBadescu commented 5 years ago

Thus, I made the decision not to make the R code dependent on any cloudyr packages (although I use them heavily in other projects). This has the additional advantage that keeps the number of libraries loaded by R at a minimum, leaving more space in the deployment package (zip ) for R packages and files provided by the user.

brorio commented 5 years ago

Yes, you have a point there with the size of the deployment package.