jschoch
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
Trending in Questions
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
I’m trying to set up Emacs with elixir-ls via lsp-mode and credo via Flycheck. This should mostly be preconfigured as Flycheck picks up c...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 28 to 19- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Nicemaker
Yes, there is a way … in the past you would use the
serverless-warmupplugin in case you use serverless framework. That would spin another funtion calling your function every 5 minutes.But AWS has a build in feature now, a simple flag
provisionedConcurreny={n}.This will make sure that you always have {n} amounts of lambdas ready and warm.
(also available in never serverless framework versions)
I am not 100% sure if that also means that the BEAM is always ready as well since it runtime is on a diffent layer, but I assume it would.
Let us know if it works.
lud
That is true but with the traditional Elixir way you need to have a server, or a cluster, that is able to handle traffic peaks. So you get this costly machine that has some CPUs and some GBs of RAM, but most of the time it runs for nothing.
With serverless you only use machines when required, and it “automatically” scales with huge traffic peaks.
That being said I am not working on such successful app so for me a persistent running server is good enough and allows to benefit from all Elixir and BEAM features.
Is there a way to warmup Elixir with AWS ? I mean the VM has slow startup times (compared to a simple PHP script or a JS lambda that will start executing code almost instantly).
Nicemaker
What I don’t understand is:
Isn’t one of elixirs big features that it can trigger subprocesses easily to a whole cluster of elixir mashines and if one of the nodes fails its not a deal at all and the process is taken over by another node?
Wouldn’t that feature be completely lost? I understand that Lambda provides all sorts of mechanisms to deal with concurrent calls and also infrastructure for dealing with failures … isn’t the only advantage left a nicer syntax and maybe a more stable eco system?
axelson
We also have a thread specifically about the announcement of “official” lambda support: Elixir on AWS Lambda is coming soon
CptnKirk
Above is the reinvent announcement and the foundation of the Alert Logic offerings. Alert Logic is a partner that is leveraging the new Lambda Runtime API to deliver a packaged solution for Elixir. I would assume that layers can be leveraged in the future for common libs and features. Similar to how deep learning python packages were deployed to assist python lambdas with deep learning tasks. What would be nice layers for Elixir? Ecto? The Elixir based deep learning Tensorflow bindings?
Lambdas can also now be fronted directly by a public HTTP(s) load balancer. So check that out too. (although if you’re handling a lot of requests, it will still likely be cheaper not to use lambda).
ckhrysze
A bit of an old thread, but apparently an announcement was made at reinvent that support is coming (or was just made available). Alert Logic is Now LevelBlue | LevelBlue
jordiee
This is true. Lambda while cool negates some of the benefits you get from running elixir.
sabri
What about the max execution time of a lambda function? as its not unlimited, then it will be impossible to have a living elixir process, right?
gmolto
We recently released the open-source SCAR framework that can run containers out of Docker images on AWS Lambda. We have included an use case to run Elixir code in AWS Lambda, just as a proof of concept of supporting programming languages (and runtime environments) other than those officially supported by AWS Lambda. Just in case you may be interested.
bzhr
It would be cool to have Elixir working on Lambda because of cost saving, but the high available nature of Erlang does not make it best fit for this architecture.