Serverless Deployment¶
Deploy USL applications to serverless platforms.
AWS Lambda¶
Configuration¶
serverless.yml:
service: my-app
provider:
name: aws
runtime: nodejs18.x
region: us-east-1
functions:
api:
handler: dist/lambda.handler
events:
- http:
path: /{proxy+}
method: ANY
Deploy¶
Google Cloud Functions¶
Deploy:
Azure Functions¶
function.json:
{
"bindings": [
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
},
{
"type": "http",
"direction": "out",
"name": "res"
}
]
}
Deploy:
Cold Start Optimization¶
USL generates optimized code for serverless:
- Minimal dependencies
- Lazy loading
- Connection pooling
- Warm-up functions