At Superpedestrian we have really gotten into using AWS lambdas for ETL, batch processing, and other scheduled tasks, so I created Lambada as a nice framework for making collections of them inside a single repo with build time configuration via environment variables.

Lambdas work great, are basically free, and have all sorts of great triggers. There are even interesting Web frameworks like Chalice coming out, but what it lacks, at least for Python, is a nice way to package, manage dependencies, and bunch them together since they tend to be small and bunches of them share code. The nice part is that Rackspace already created a nice package and deployment system through Lambda Uploader, so all that was really left was for me to make a framework for grouping them together in a single repo/project along with a way to do security sensitive configuration at build time via environment variable injection or yaml file.

Lambada lets you use decorators similar to Flask, to have one project with multiple Lambda functions in that can all be tested, run, and uploaded with a command line interface. The quick start guide has more details, but basically, you can make a file that looks like:

from lambada import Lambada

chart = Lambada(
    handler='fouronthefloor.chart',
    role='arn:aws:iam:xxxxxxx:role/lambda',
    region='us-west-2',
    timeout=60,
    memory=128
)

@chart.dancer
def test_lambada(event, context):
    print('Event: {}'.format(event))


@chart.dancer(
    name='high_memory_test',
    memory=1024,
    requirements=['requirements.txt', 'xtra_requirements.txt']
)
def cool_oneoff(event, context):
    print('Wow, so much memory! extra reqs!')


@chart.dancer(memory=512, timeout=5)
def bob_loblaw(event, _):
    print('Such a great reference!')

and with a single lambada upload command create three lambdas in your AWS account with different requirements on time, memory, aws region, and even software dependencies.