Lambdify
AWS Lambda automation and integration for Python.
Install / Use
/learn @ZhukovAlexander/LambdifyREADME
λambdify - because code is the only thing that matters
DISCLAIMER: lambdify is just a POC, it's not actively maintained and is not suitable for production use at the moment
lambdify is a tool that turns any python callable into an AWS Lambda function. Create, update and call your lambdas directly from python.
Just like that:
install lambdify...
$pip install lambdify
...create AWS Lambda with 4 lines of code:
from lambdify import Lambda
@Lambda.f(name='echo')
def echo(*args, **kwargs):
return args, kwargs
echo.create()
if __name__ == '__main__':
import getpass
echo(msg='Hello, {user}!'.format(user=getpass.getuser()))
Now you can head over to your AWS Lambda console and behold your echo function. Could creating a serverless program be any easier?
The goal
Lambdify aims to unite convenient task queues API (i.e. Celery, Hue, RQ's @job decorator) with AWS Lambda service coolest features. Ultimately, lambdify should be capable to become a good alternative to Celery or any other task queue.
At present, there are some solutions, that allow you to create and deploy lambdas, like Zappa, lambda-uploader, lambder etc., but they still have limitations of not being able to interact directly with a python program. lambdify overcomes such limitations by using the following algorithm:
-
Serialize the callable with it's globals using dill
-
Upload the
.lambda.dumpfile containing the serialized function along with the rest of the package -
Special
container.pymodule will look for the.lambda.dumpfile and inject deserialized function into it's namespace -
????
-
Profit
Documentation
>>>from lambdify import Lambda
>>>help(Lambda)
#Usecases and features
- Workerless task queue replacement
The simpliest task queue ever
@Lambda.f(name='my_job')
def add(a, b):
return a + b
- Distributed computing
Lambdas can create and call other lambdas:
@Lambda.f(name='child')
def child_function(x, y):
return x * y
@Lambda.f(name='parent')
def parent_function(y):
# this will actually call the cloud instance of
# child_function
return child_function(2, y)
parent_function(42)
- Cloud Functional Reactive Programming
- Dynamic and realtime lambda-function management
P.S. Lambdify is a POC, and at the time allows your lambda to only use site-packages, all local files won't be packaged, so each user-defined dependency should be contained withing the same file.
Related Skills
tmux
348.5kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
claude-opus-4-5-migration
109.1kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
model-usage
348.5kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
diffs
348.5kUse the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
