Skip to content

Commit e877f28

Browse files
authored
feat(docs): refine messaging to emphasize Lambda-first design (#228)
* feat(docs): refine documentation for MinimalLambda's AWS Lambda focus - Updated index and README files to highlight Lambda-first design and minimal API-inspired patterns. - Enhanced description of key features, including envelopes, lifecycle hooks, and source generation. - Improved AOT readiness and dependency injection explanations for clarity. - Refined messaging to emphasize Lambda-optimized runtime and familiar .NET ergonomics. * feat(docs): improve description of Lambda-first design in MinimalLambda - Refined wording to clearly emphasize the framework's type-safe and scoped invocation capabilities. - Enhanced messaging around predictable timeouts and smoother developer experience. - Added details on Lambda's execution model alignment for better clarity.
1 parent ca5e2cc commit e877f28

3 files changed

Lines changed: 17 additions & 37 deletions

File tree

README.md

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,33 @@
55
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=j-d-ha_minimal-lambda&metric=alert_status&token=9fb519975d91379dcfbc6c13a4bd4207131af6e3)](https://sonarcloud.io/summary/new_code?id=j-d-ha_minimal-lambda)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
77

8-
**ASP.NET Core-style patterns for AWS Lambda**Build Lambda functions (for any trigger) using the same clean, declarative patterns as ASP.NET Core Minimal APIs.
8+
**Lambda-first hosting with Minimal API-inspired patterns**Familiar .NET ergonomics with handlers, DI, and middleware, purpose-built for AWS Lambda triggers.
99

1010
> 📚 **[View Full Documentation](https://j-d-ha.github.io/minimal-lambda/)**
1111
1212
## Overview
1313

14-
**If you know ASP.NET Core Minimal APIs, you already know MinimalLambda.**
14+
MinimalLambda brings the clean, declarative style of ASP.NET Core Minimal APIs to AWS Lambda while staying grounded in Lambda’s execution model. Use the same mental model (builder, DI, middleware, handler mapping) while leaning on Lambda-specific features like strongly-typed envelopes, lifecycle hooks, scoped invocations, and source generation.
1515

16-
MinimalLambda brings the clean, declarative coding style of ASP.NET Core Minimal APIs to AWS Lambda – for **any trigger type** (SQS, SNS, API Gateway, Kinesis, S3, EventBridge, and more):
16+
- **Familiar builder flow**: `LambdaApplication.CreateBuilder()``Build()``RunAsync()`
17+
- **.NET DI you already use**: `builder.Services.AddScoped<IMyService, MyService>()` with Lambda-safe lifetimes
18+
- **Handler mapping, Lambda edition**: `lambda.MapHandler(...)` instead of crafting raw handlers
19+
- **Middleware for cross-cutting concerns**: `lambda.UseMiddleware(...)` to wrap your pipeline
20+
- **Lambda-first runtime**: Lifecycle hooks, cancellation token management, and strongly typed envelope models for event triggers
1721

18-
- **Same builder pattern**: `LambdaApplication.CreateBuilder()``Build()``RunAsync()`
19-
- **Same dependency injection**: `builder.Services.AddScoped<IMyService, MyService>()`
20-
- **Same handler mapping**: `lambda.MapHandler(...)` just like `app.MapGet(...)`
21-
- **Same middleware pipeline**: `lambda.Use(...)` for cross-cutting concerns
22-
- **Same foundation**: Built on `Microsoft.Extensions.Hosting` like ASP.NET Core
23-
24-
Instead of writing boilerplate Lambda handlers, you get familiar .NET patterns with automatic dependency injection, proper scoped lifetimes, middleware support, and compile-time code generation for zero reflection overhead.
22+
Instead of writing boilerplate Lambda handlers, you keep familiar .NET patterns while the framework handles event envelopes, dependency injection, scoped lifetimes, middleware, and compile-time code generation for zero reflection overhead.
2523

2624
## Key Features
2725

2826
- **Minimal API Pattern** – Map handlers with `lambda.MapHandler(...)` just like `app.MapGet()` in ASP.NET Core – clean, declarative, and intuitive
2927
- **Dependency Injection** – Constructor and parameter injection using `Microsoft.Extensions.DependencyInjection` with proper scoped lifetimes per invocation
3028
- **Middleware Pipeline** – Familiar `Use()` pattern for cross-cutting concerns like logging, validation, and error handling
3129
- **Source Generated** – Compile-time code generation for zero reflection overhead and optimal performance
32-
- **AOT Ready** – Native AOT compilation support for sub-100ms cold starts
30+
- **AOT Ready** – Native AOT compilation support for fast cold starts
3331
- **Built-in Observability** – OpenTelemetry integration for distributed tracing and metrics
3432
- **Type-Safe Envelopes** – Strongly-typed event wrappers for SQS, SNS, API Gateway, Kinesis, and more
3533
- **Minimal Runtime Overhead** – Lightweight abstraction layer built on the same foundation as ASP.NET Core
3634

37-
## From ASP.NET Core to Lambda
38-
39-
If you're familiar with ASP.NET Core Minimal APIs, the transition to MinimalLambda is seamless:
40-
41-
| ASP.NET Core Minimal API | MinimalLambda |
42-
|---|---|
43-
| `WebApplication.CreateBuilder()` | `LambdaApplication.CreateBuilder()` |
44-
| `app.MapGet("/hello", ...)` | `lambda.MapHandler(...)` |
45-
| `builder.Services.AddScoped<T>()` | `builder.Services.AddScoped<T>()` |
46-
| `app.UseMiddleware<T>()` | `lambda.UseMiddleware<T>()` |
47-
| `app.RunAsync()` | `lambda.RunAsync()` |
48-
| `HttpContext` dependency injection | `ILambdaContext` dependency injection |
49-
| Route parameters | `[Event]` attribute for event binding |
50-
51-
The patterns are intentionally identical – if you know one, you know the other.
52-
5335
## Packages
5436

5537
The framework is divided into multiple NuGet packages:

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
title: ""
33
---
44

5-
# MinimalLambda: ASP.NET Core Patterns for Lambda
5+
# MinimalLambda: ASP.NET Core Patterns for AWS Lambda
66

77
[![Main Build](https://github.com/j-d-ha/minimal-lambda/actions/workflows/main-build.yaml/badge.svg)](https://github.com/j-d-ha/minimal-lambda/actions/workflows/main-build.yaml)
88
[![codecov](https://codecov.io/gh/j-d-ha/minimal-lambda/graph/badge.svg?token=BWORPTQ0UK)](https://codecov.io/gh/j-d-ha/minimal-lambda)
99
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=j-d-ha_minimal-lambda&metric=alert_status&token=9fb519975d91379dcfbc6c13a4bd4207131af6e3)](https://sonarcloud.io/summary/new_code?id=j-d-ha_minimal-lambda)
1010
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/j-d-ha/minimal-lambda/blob/main/LICENSE)
1111

12-
**If you know ASP.NET Core Minimal APIs, you already know MinimalLambda.**
12+
**Minimal API-inspired, Lambda-first hosting.**
1313

14-
MinimalLambda brings the clean, declarative coding style of ASP.NET Core Minimal APIs to AWS Lambda – for **any event source** (SQS, SNS, API Gateway, Kinesis, S3, EventBridge, etc.). Use the same builder pattern, dependency injection, middleware pipeline, and handler mapping that you're familiar with from ASP.NET Core – but optimized for Lambda's execution model with source generation, proper scoped lifetimes, and automatic cancellation token handling.
14+
MinimalLambda keeps the builder, DI, middleware, and handler mapping patterns you know from ASP.NET Core, but is built from the ground up for **any Lambda event source** (SQS, SNS, API Gateway, Kinesis, S3, EventBridge, etc.). Strongly-typed envelopes, lifecycle hooks, scoped invocations, source generation, and cancellation-token handling shape those familiar patterns to Lambdas execution model—so you get type-safe events, per-invocation scopes, predictable timeouts, and a smoother developer experience when iterating locally or in CI.
1515

1616
[Get Started](getting-started/index.md){ .md-button .md-button--primary }
1717
[Guides](guides/index.md){ .md-button }

src/MinimalLambda/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# MinimalLambda
22

3-
**ASP.NET Core Minimal API-style patterns for AWS Lambda** – Build Lambda functions for any trigger using familiar .NET patterns.
3+
**Minimal API-style ergonomics, Lambda-first runtime** – Build Lambda functions for any trigger using familiar .NET patterns without sacrificing Lambda-specific capabilities.
44

55
> 📚 **[View Full Documentation](https://j-d-ha.github.io/minimal-lambda/)**
66
77
## Overview
88

9-
**If you know ASP.NET Core Minimal APIs, you already know MinimalLambda.**
10-
11-
Write Lambda functions with the familiar minimal API pattern from ASP.NET Core:
9+
Write Lambda functions with the familiar minimal API pattern from ASP.NET Core, adapted for Lambda's execution model:
1210

1311
```csharp
1412
var builder = LambdaApplication.CreateBuilder();
@@ -23,12 +21,12 @@ await lambda.RunAsync();
2321

2422
The framework provides:
2523

26-
- **Minimal API Pattern**: `lambda.MapHandler(...)` just like `app.MapGet()` – clean and declarative
27-
- **Dependency Injection**: Same DI container as ASP.NET Core with proper scoped lifetimes per invocation
24+
- **Minimal API Pattern**: `lambda.MapHandler(...)` in the same declarative style as `app.MapGet()`
25+
- **Dependency Injection**: The ASP.NET Core container with scoped lifetimes tailored to Lambda invocations
2826
- **Middleware Pipeline**: Familiar `Use()` pattern for cross-cutting concerns
2927
- **Source Generated**: Compile-time code generation for zero reflection overhead
3028
- **Native AOT Ready**: Full AOT support for sub-100ms cold starts
31-
- **Lambda-Optimized**: Automatic cancellation tokens, timeout handling, and efficient resource use
29+
- **Lambda-Optimized**: Envelopes, lifecycle hooks, automatic cancellation tokens, and timeout handling
3230

3331
## Installation
3432

0 commit comments

Comments
 (0)