Kralizek.Lambda.Template.Abstractions
6.0.0
dotnet add package Kralizek.Lambda.Template.Abstractions --version 6.0.0
NuGet\Install-Package Kralizek.Lambda.Template.Abstractions -Version 6.0.0
<PackageReference Include="Kralizek.Lambda.Template.Abstractions" Version="6.0.0" />
<PackageVersion Include="Kralizek.Lambda.Template.Abstractions" Version="6.0.0" />
<PackageReference Include="Kralizek.Lambda.Template.Abstractions" />
paket add Kralizek.Lambda.Template.Abstractions --version 6.0.0
#r "nuget: Kralizek.Lambda.Template.Abstractions, 6.0.0"
#:package Kralizek.Lambda.Template.Abstractions@6.0.0
#addin nuget:?package=Kralizek.Lambda.Template.Abstractions&version=6.0.0
#tool nuget:?package=Kralizek.Lambda.Template.Abstractions&version=6.0.0
Kralizek.Lambda.Template.Abstractions
Kralizek.Lambda.Template.Abstractions contains the consumer-facing contracts shared by the Lambda programming model and source-specific integrations.
The package intentionally has no dependency on AWS Lambda runtime types, dependency injection, configuration, logging, or JSON serialization. Libraries can implement handlers, contexts, and payload decoders without loading the full runtime package.
Handler contracts
The package defines the handler contracts used by the semantic function roots:
IEventHandler<TInput>andIEventHandler<TInput, TContext>IRequestHandler<TInput, TOutput>andIRequestHandler<TInput, TOutput, TContext>IRecordHandler<TRecord, TRecordResult, TContext>
The compact forms use the standard EventContext and RequestContext. Full forms allow source-specific integrations to expose richer context types.
Record handlers use a source-specific result derived from LambdaRecordResult. Its Value property deliberately matches the runtime shape of the C# union contract so source-specific result models can adopt IUnion when the library targets a framework that exposes it.
Function contexts
FunctionContext exposes common invocation metadata through strongly typed, source-neutral properties:
AwsRequestIdFunctionNameFunctionVersionInvokedFunctionArnMemoryLimitInMBRemainingTimeLogGroupNameLogStreamName
The standard semantic contexts are EventContext, RequestContext, and RecordContext.
Contexts also expose a Properties bag for runtime-specific data that is not represented by the strongly typed contract. The abstractions package does not interpret those values or depend on the runtime types stored in the bag.
Kralizek.Lambda.Template maps the AWS ILambdaContext into the strongly typed metadata and preserves the original runtime context in this bag. Applications that reference the main package can retrieve it through GetLambdaContext() when they need information not surfaced by the abstractions.
Payload decoders
Payload decoders transform the raw payload extracted by an event-source integration into the application contract handled by your function.
For text-based payloads such as SQS message bodies and SNS messages, implement:
public interface IStringPayloadDecoder<TPayload>
{
ValueTask<TPayload> DecodeAsync(
string payload,
CancellationToken cancellationToken = default);
}
For event sources that expose binary payloads, implement:
public interface IBinaryPayloadDecoder<TPayload>
{
ValueTask<TPayload> DecodeAsync(
ReadOnlyMemory<byte> payload,
CancellationToken cancellationToken = default);
}
A decoder is deliberately unaware of SQS, SNS, Kinesis, or any other event source. Glue packages decide which raw representation they consume and depend only on the matching abstraction.
Lightweight extension packages
A custom handler, context, or decoder library can reference only this package:
<PackageReference Include="Kralizek.Lambda.Template.Abstractions" Version="..." />
For example:
public sealed class MyDecoder : IStringPayloadDecoder<OrderCreated>
{
public ValueTask<OrderCreated> DecodeAsync(
string payload,
CancellationToken cancellationToken = default)
{
// Decode using the serialization format required by the application.
throw new NotImplementedException();
}
}
Kralizek.Lambda.Template provides PlainTextStringPayloadDecoder for unchanged text payloads and System.Text.Json implementations for both string and binary payloads. The JSON decoders support JsonSerializerOptions as well as source-generated JsonSerializerContext / JsonTypeInfo<TPayload> metadata for Native AOT scenarios.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Kralizek.Lambda.Template.Abstractions:
| Package | Downloads |
|---|---|
|
Kralizek.Lambda.Template
Core runtime for AWS Lambda functions using the Event, Request, and Record programming models, with dependency injection, configuration, logging, cancellation, and framework telemetry. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.0.0 | 44 | 8/26/2026 |
| 6.0.0-rc.1 | 93 | 8/24/2026 |
| 6.0.0-beta.5 | 116 | 8/21/2026 |
| 6.0.0-beta.4 | 118 | 8/20/2026 |
| 6.0.0-beta.3 | 110 | 8/14/2026 |
| 6.0.0-beta.2 | 88 | 8/12/2026 |
| 6.0.0-beta.1 | 111 | 8/10/2026 |