SW.Serverless is an open-source .NET framework for building and running serverless adapters and services. It provides a runtime environment for executing .NET applications as serverless functions with process isolation and communication through stdin/stdout.
| Package | Version | Downloads |
|---|---|---|
SimplyWorks.Serverless | ||
SimplyWorks.Serverless.Sdk |
- SW.Serverless: Core serverless service library with dependency injection extensions for ASP.NET Core
- SW.Serverless.Sdk: SDK for developing serverless adapters with the
Runnerclass and logging utilities - SW.Serverless.SampleWeb: Example ASP.NET Core web application showing integration
- SW.Serverless.Installer: Command-line tool for packaging and deploying adapters to cloud storage
dotnet add package SimplyWorks.Serverless
dotnet add package SimplyWorks.Serverless.Sdk// In Startup.cs or Program.csservices.AddServerless();usingSW.Serverless.Sdk;classHandler{publicasyncTask<string>ProcessData(stringinput){// Your serverless logic herereturn$"Processed: {input}";}}classProgram{staticasyncTaskMain(string[]args)=>awaitRunner.Run(newHandler());}- Process Isolation: Each adapter runs in its own process with timeout management
- Cloud Storage Integration: Support for AWS S3, Azure Storage, and Oracle Cloud
- Dependency Injection: Built-in integration with ASP.NET Core DI container
- Logging: Structured logging support through
AdapterLogger - Caching: Adapter metadata caching with configurable duration
- Version Management: Semantic versioning support for adapter deployments
The framework consists of:
- ServerlessService: Manages adapter lifecycle, installation, and invocation
- Runner: Entry point for adapter applications with command processing
- Installer: CLI tool for building and deploying adapter packages
- Cloud Storage: Abstraction layer for different cloud storage providers
For issues, questions, or contributions, please visit the GitHub repository.