bakdata / aws-lambda-r-runtime

Serverless execution of R code on AWS Lambda
https://medium.com/bakdata/running-r-on-aws-lambda-9d40643551a6
MIT License
144 stars 53 forks source link

Creating layer #6

Closed jburke-IWT closed 5 years ago

jburke-IWT commented 5 years ago

Hi Philip,

Do I have to run the build_recommended to get the layer? Or an I just zip R/library/ and load it manually through AWS lambda layers? I tried running build_recommended and it's creating R/library but the folder is empty and it's not creating a zip.

philipp94831 commented 5 years ago

Hi @jburke-IWT, to build a custom layer, you just need to zip the libraries and place them under R/library/ in your archive. If you run build_recommended.sh, it should build such an archive for you which is non-empty. However, you need to provide a compiled R distribution for that. Please see the README for information on how to create such a distribution. Nevertheless, you do not need to build the layer yourself, you can always use our distribution:

Available AWS regions:

Available R versions:

ARN: arn:aws:lambda:${region}:131329294410:layer:r-recommended-${version}:1