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
143 stars 52 forks source link

Add an "R only" layer for mixing R with other runtimes #59

Open kgutwin opened 4 years ago

kgutwin commented 4 years ago

My use case is primarily based on another language runtime (python) but would like to be able to also call R scripts. The build framework here only needs slight tweaks to deploy an "R only" layer that is suitable for combining with all other runtimes.

This PR currently only contains the changes to the build scripts to build and deploy the "R only" layer. Updates to the documentation and test framework can follow later if desired.

Also note that replacing the chown call with docker run --user $(id -u) should resolve issue #52.

Thanks!

kgutwin commented 4 years ago

I'm not sure why this test is failing, I doubt it has anything to do with my changes.

https://github.com/bakdata/aws-lambda-r-runtime/blob/6c8560a2a97bee2439550c6aba51562ff179bee0/tests/test_aws.py#L29

When I ran python3 -m unittest on my system, it failed here as well, although that was due to bad AWS credentials. When I fixed my AWS credentials, this test passed. Is this test dependent on AWS API access somehow?