boxlang-runtime-aws-lambdalisted
Install: claude install-skill ortus-boxlang/skills
# BoxLang on AWS Lambda
## Overview
The BoxLang AWS Runtime provides a pre-built Java handler for serverless Lambda
functions. You write BoxLang classes; the runtime handles request/response
lifecycle, serialization, logging, and error management.
---
## Handler Configuration
Set this as your Lambda handler in AWS:
```
ortus.boxlang.runtime.aws.LambdaRunner::handleRequest
```
The runtime automatically:
- Deserializes the incoming JSON event into a BoxLang `Struct`
- Calls your `Lambda.bx` class `run()` method
- Serializes the return value back to JSON
- Manages error handling and logging
---
## Lambda.bx Convention
The runtime looks for `Lambda.bx` in your deployment package root and calls `run()`:
```boxlang
class {
/**
* The main Lambda handler function.
*
* @param event The incoming event struct (deserialized from JSON)
* @param context The AWS Lambda context object (Java LambdaContext)
* @param response A pre-built response struct you can populate:
* { statusCode: 200, body: "", headers: {} }
*/
function run( event, context, response ){
// Simple return value — auto-serialized to JSON
return {
statusCode: 200,
body: {
message: "Hello from BoxLang Lambda!",
input: event
}
}
}
}
```
### Response Convention
You can either `return` a value or populate the `response` struct:
```boxlang
function run( eve