I did a few experiments with running on lambda via exrm because I wanted to avoid writing .js as much as possible. Here is what I found.
- the invocation time is slow for 128MB ram, need to make sure you have enough ram since ram and CPU are proportional. 128MB execution time is ~ 2-4 seconds.
- permissions are tricky due to the .erlang.cookie and the deployment model. I was only able to get one piece working by setting it to
nocookie. You have to be aware that one user puts your files into the container, and your invocation user may be random.
- exrm seems to nicely bundle up libs and dependencies for a basic app. No mucking around with LD_LIBRARY_PATH was needed.
- deploying less to /var/task (where your zipped files go by default) is the best way to manage permissions. You can’t change these files after they are deployed to this root, but you can deploy a dir with 777 permissions and then chmod it later.
- you have to set a HOME env var for each possilbe invoker or erlang will complain. This where .erlang.cookie ends up living and you never know who will invoke. Since erlang.cookie needs something like permistions of 700 or 500 your processes will crash with file access problems.
wondering if others are interested in this