serverless-lss
v0.2.2
Published
Serverless plugin to auto-register services with Local Serverless Stack (LSS) Orchestrator
Downloads
451
Maintainers
Readme
Serverless Orchestrator Plugin
Automatically register your Serverless microservices with the Local Serverless Stack Local Orchestrator.
Installation
npm install --save-dev serverless-lssUsage
Add the plugin to your serverless.yml:
plugins:
- serverless-lss
custom:
orchestrator:
enabled: true
orchestratorUrl: http://localhost:3100How it works
After running sls package or sls deploy:
- The plugin sends a registration request to the Orchestrator (service path, ports, region)
- The Orchestrator reads the
sls packageartifacts from.serverless/(CloudFormation template +serverless-state.json) - It provisions resources (DynamoDB, SQS, SNS, S3) to LocalStack
- It registers the service's Lambda functions, HTTP routes and authorizers, starts a runtime worker, and binds the service's API port (30xx) and Lambda-invoke port (130xx) — replacing
serverless-offline
Configuration Options
enabled(boolean, default:true): Enable/disable the pluginorchestratorUrl(string, default:http://localhost:3100): Orchestrator API endpoint
Service ports
The plugin reports which ports LSS should serve the service on:
custom:
lss: # preferred — explicit LSS ports
apiPort: 3010 # API Gateway emulator (HTTP routes)
invokePort: 13010 # AWS Lambda Invoke API
serverless-offline: # fallback — drop-in for services already using offline
httpPort: 3010
lambdaPort: 13010If only apiPort is known, the orchestrator derives invokePort = apiPort + 10000
(configurable via lambdaRuntime.invokePortOffset).
Example with custom config:
plugins:
- serverless-lss
custom:
orchestrator:
enabled: true
orchestratorUrl: http://my-orchestrator:3100Environment Variables (optional)
You can also use environment variables to override the configuration:
ORCHESTRATOR_URL=http://localhost:3100 sls packageFeatures
✅ Auto-registers on sls package
✅ Auto-registers on sls deploy
✅ Non-blocking: deployment continues even if orchestrator is unavailable
✅ Colored console output
✅ Minimal dependencies
Behavior
- If the Orchestrator is unavailable, the plugin logs a warning but doesn't fail the deployment
- The plugin is compatible with all Serverless Framework providers
- It only reads existing
.serverless/cloudformation-template-update-stack.jsonfiles (doesn't create them)
Troubleshooting
"Orchestrator unavailable" message
Make sure the Orchestrator is running:
cd orchestrator
npm run serverPlugin not found
Make sure you're using a recent version of Serverless Framework (3.0+) and that the plugin is installed in node_modules.
Development
# Build
npm run build
# Watch mode
npm run dev