Developer Documentation

Comprehensive guides and API references for building on ellba.lambda

Getting Started

Welcome to ellba.lambda! This guide will show you how to deploy your first serverless function in minutes.

  1. Install the ellba CLI with npm install -g @ellba/cli
  2. Create a lambda directory with ellba init my-function
  3. Implement your function in index.js or main.py
  4. Deploy with ellba deploy

Quick Start Guide

JavaScript Example


// index.js
exports.handler = async (event) => {
    return {
        statusCode: 200,
        body: JSON.stringify({ message: "Hello from ellba.lambda!" })
    };
};

Python Example


# main.py
def handler(event):
    return {
        "statusCode": 200,
        "body": json.dumps({"message": "Hello from ellba.lambda!"})
    }

API Reference

Event Object

The event object passed to your function contains the following properties:

  • headers: Request headers
  • body: Request body
  • queryString: Query string parameters
  • path: Request path

Response Object

Your function must return a response object with:

{ statusCode: 200, body: '{"message": "Hello world"}' }

Status codes 200-299 are successful, 400-599 indicate errors