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.
- Install the ellba CLI with
npm install -g @ellba/cli
- Create a lambda directory with
ellba init my-function
- Implement your function in
index.js
ormain.py
- 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 headersbody
: Request bodyqueryString
: Query string parameterspath
: 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