AWS Lambda Powertools for .NET¶
AWS Lambda Powertools for .NET (which from here will be referred as Powertools) is a suite of utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more. Please note, Powertools is optimized for .NET 6 only.
The GitHub repository for this project can be found here.
Do not use this library in production
AWS Lambda Powertools for .NET is currently released in preview and is intended strictly for feedback purposes only. This version is not stable, and significant breaking changes might incur as part of the upcoming production-ready release.
Your support is much appreciated. If you encounter any problems, please raise an issue.
Do not use this library for production workloads.
Available Powertools libraries¶
|Tracing||Decorators and utilities to trace Lambda function handlers, and both synchronous and asynchronous functions|
|Logger||Structured logging made easier, and decorator to enrich structured logging with key Lambda context details|
|Metrics||Custom AWS metrics created asynchronously via CloudWatch Embedded Metric Format (EMF)|
Powertools are available as NuGet packages. You can install the packages from NuGet gallery or from Visual Studio editor. Search
AWS.Lambda.Powertools* to see various utilities available.
dotnet nuget add AWS.Lambda.Powertools.Tracing
dotnet nuget add AWS.Lambda.Powertools.Logging
dotnet nuget add AWS.Lambda.Powertools.Metrics
SAM CLI custom template¶
We have provided you with a custom template for the Serverless Application Model (AWS SAM) command-line interface (CLI). This generates a starter project that allows you to interactively choose the Powertools features that enables you to include in your project.
To use the SAM CLI, you need the following tools.
- SAM CLI - Install the SAM CLI
- .NET 6.0 (LTS) - Install .NET 6.0
- Docker - Install Docker community edition
We have provided a few examples that should you how to use the each of the core Powertools features.
Other members of the AWS Lambda Powertools family¶
Not using .NET? No problem we have you covered. Here are the other members of the AWS Lambda Powertools family:
- AWS Lambda Powertools for Python
- AWS Lambda Powertools for Java
- AWS Lambda Powertools for TypeScript
- AWS Developers Slack:
#lambda-powertools- Invite, if you don't have an account
- Email: firstname.lastname@example.org