From 9a56bfc4730fd23cc8be8c6e2f9c9c5017ad04e5 Mon Sep 17 00:00:00 2001 From: Grigory Starinkin Date: Fri, 28 Dec 2018 10:54:44 +0000 Subject: [PATCH] add note on code loading mode into readme --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index af8afd3..e7a6423 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,28 @@ Current testing has shown that it does not make sense to run Erlang on AWS Lambda functions with less then 256MB RAM. Having 512-1024MB is optimal for most of the use cases. +### Configuration + +#### Code loading mode + +Depending on a use case, erlang [code loading mode](http://erlang.org/doc/man/code.html) +[can](https://github.com/alertlogic/erllambda/issues/46) significantly affect execution performance. + +To switch between `interactive` or `embedded` modes set `CODE_LOADING_MODE` environment variable on +AWS Lambda function creation step with a desired value: + +
+aws --profile default --region <region> \
+ lambda create-function \
+ --function-name <your_function> \
+ --memory-size 1024 \
+ --handler <your_function_module_name> \
+ --zip-file fileb://_build/prod/<your_function>-0.0.0.zip \
+ --environment "Variables={CODE_LOADING_MODE=interactive}"
+ --runtime provided \
+ --role <role-arn>
+
+ ### Basic Deployment See [Erllambda Example](https://github.com/alertlogic/erllambda_example) for the step-by-step procedure to deploy your Lambda.