OSLS (Open-Source Serverless) Framework

3.63.2 · active · verified Tue Apr 21

OSLS (Open-Source Serverless) Framework, currently at version 3.63.2, is a community-maintained, open-source fork of the Serverless Framework v3. It acts as a drop-in replacement for users who cannot or choose not to upgrade to Serverless Framework v4. The project primarily focuses on supporting AWS Lambda deployments, offering up-to-date compatibility with new AWS runtimes and bug fixes. It distinguishes itself by being lighter and faster than the original v3, having removed enterprise features (like Serverless Dashboard and Components), auto-updating, and unused dependencies. Maintained by the Bref community, its release cadence involves frequent patch and minor updates to ensure continued compatibility and security. It supports various languages including Node.js, TypeScript, Python, Go, and Java, leveraging an approachable YAML syntax for defining serverless applications and their infrastructure.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to install OSLS globally, define a basic AWS Lambda function with an API Gateway endpoint using `serverless.yml`, deploy it, invoke it, and then remove the deployed resources.

// serverless.yml
service: my-first-osls-app
frameworkVersion: "3"

provider:
  name: aws
  runtime: nodejs20.x
  region: us-east-1
  stage: dev

functions:
  hello:
    handler: handler.hello
    events:
      - httpApi:
          path: /hello
          method: get

// handler.js
'use strict';

module.exports.hello = async (event) => {
  return {
    statusCode: 200,
    body: JSON.stringify(
      {
        message: 'Hello from OSLS!',
        input: event,
      },
      null,
      2
    ),
  };
};

// --- Terminal Commands ---
npm install -g osls
# Navigate to your project directory
# cd my-first-osls-app
serverless deploy --verbose
# Note the endpoint URL from the deploy output
serverless invoke --function hello --log
serverless remove

view raw JSON →