Regardless of process time limitation in AWS Lambda, is there any example about using AWS Lambda with phoenix ? I saw this library AWS Lambda Elixir Runtime – AWS Lambda Elixir Runtime v0.1.0 but I am not sure how to use it in phoenix to make main entry point for phoenix it self.
Has any one tried it?
What exactly are you trying to do here? Afaik Lambda isn’t meant to be used as a web server like Phoenix does. Maybe if you put it behind a load balancer or something you could get the requests from the lamdba entrypoint and forward them to Phoenix but that sounds a lot like bending a tool to do something it’s not meant to.
Consider GitHub - alertlogic/mix_erllambda: Erllambda support for Elixir both Erlang and Elixir libraries from AlertLogic are very good and competent.
@Blond11516 I am experimenting, and I have an old project written in elixir, I just want to use it to parse output of a library that runs on the OS. I tried AWS Lambda Elixir Runtime – AWS Lambda Elixir Runtime v0.1.0 but still not working executable file not found in $PATH · Issue #13 · aws-samples/aws-lambda-elixir-runtime · GitHub
I’m still not sure what this has to do with Phoenix. Does your old project use it and you’re trying to shove it as-is in Lambda? Phoenix is at the same level of abstraction as Lambda: they’re both entrypoints to your application. Ideally your buisness logic is separate from that so it should be easy to ditch Phoenix and use Lambda’s entrypoint on its own.
Reagrding your issue with the runtime, I got an Elixir lambda going with this project template, which uses a forked version of the runtime you’re using. Quickly glancing at the commits, most of the differences are in the Dockerfile, so it might be worth a shot. In my case it got a “Hello world” lambda going without trouble. Here’s the article through which I found it in case you want a higher level overview.
Thanks @Blond11516 , yes I think I should be able to ditch Phoenix and use Lambda’s entrypoint on its own.