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

problems running / building my own runtime layers #19

Closed dtenenba closed 5 years ago

dtenenba commented 5 years ago

Hi, I'd like to use your layers but in the us-west-2 region where all of my other cloud infrastructure is located. It appears that the layer r-runtime at least is not available in that region.

Do you know of a way to copy a layer to another region? Seems like aws lambda get-layer-version ought to work but for me that just prints out the version of the aws CLI.

Failing that, I can try and build/publish it myself, but I notice that your scripts grab the R source from an S3 bucket (aws-lambda-r-runtime) that I do not have access to.

I can change this to another bucket, but I was wondering how the R source zip file was created. Typically the R source is distributed as a .tar.gz file; did you modify this source tarball in any way, and if so is that documented somewhere?

dtenenba commented 5 years ago

I did find the layer, with the arn arn:aws:lambda:us-west-2:131329294410:layer:r-runtime-3_5_1, and I was able to call get_layer_version on it from boto3. I will probably create my own copy, just in case yours go away at some point. Thanks!

And I'm still interested in building my own layers, so interested in the question about how the R source zip file was created. Thanks!

philipp94831 commented 5 years ago

Hi @dtenenba, I don't know how to copy a layer from one region to another, but you can have a look at the deploy script to understand how to deploy a packaged layer to a region. The compiled R distribution is different from the sources, to build it yourself, please refer to the README and the according script.