Skip to content

Repository files navigation

AWS Lambda Sharp Template

AWS Lambda runtime libraries and dotnet new templates for .NET 10, built around explicit handler contracts, dependency injection, configuration, logging, cancellation, and source-specific AWS semantics.

Programming model

The library has three semantic roots:

  • EventFunction<TInput, THandler> for one-way events.
  • RequestFunction<TInput, TOutput, THandler> for request/response functions.
  • RecordFunction<...> for integrations that process multiple records per invocation.

AWS-specific packages specialize those roots for EventBridge, SQS, SNS, DynamoDB Streams, Kinesis Streams, S3, and Cognito.

Start with Choosing a Function Model or browse the documentation.

Project templates

dotnet new install Kralizek.Lambda.Templates
dotnet new list lambda-template

See Project Templates for the supported templates and when to use each one.

The template options are independent where supported: --minimal selects lean hosting for source-neutral Request/Event templates, --raw chooses the record/payload shape, --aot chooses executable hosting and source-generated Lambda serialization, and --otel adds Lambda invocation instrumentation.

Package family

Kralizek.Lambda.Templates is the easiest entry point when starting a new Lambda function. The generated project references the runtime package appropriate for the selected template.

Package Stable Latest Downloads Purpose
Kralizek.Lambda.Templates stable latest downloads dotnet new templates for the supported Lambda function models and AWS event sources.
Kralizek.Lambda.Template.Abstractions stable latest downloads Runtime-independent handler contracts, contexts, record results and payload-decoder abstractions.
Kralizek.Lambda.Template stable latest downloads Core Lambda runtime, including Event, Request and Record function models, lifecycle, dependency injection and framework telemetry.
Kralizek.Lambda.Template.Cognito stable latest downloads Cognito User Pool trigger specializations and handler contracts.
Kralizek.Lambda.Template.DynamoDbStreams stable latest downloads DynamoDB Streams record processing and partial-batch response support.
Kralizek.Lambda.Template.EventBridge stable latest downloads EventBridge event-envelope specialization and source-specific context.
Kralizek.Lambda.Template.KinesisStreams stable latest downloads Kinesis Streams record processing, payload decoding and checkpoint/partial-batch behavior.
Kralizek.Lambda.Template.S3 stable latest downloads Native S3 event notifications and S3 Batch Operations.
Kralizek.Lambda.Template.Sns stable latest downloads SNS notification processing and payload decoding.
Kralizek.Lambda.Template.Sqs stable latest downloads SQS message processing, payload decoding and partial-batch response support.

The template package and all runtime packages use the same package version for a given release. For most applications, install Kralizek.Lambda.Templates and let the selected template choose the runtime package.

Documentation

About

AWS Lambda runtime libraries and .NET project templates with explicit handler contracts, DI, AOT, OpenTelemetry, and source-specific AWS semantics.

Topics

Resources

Contributing

Security policy

Stars

63 stars

Watchers

5 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages