Powertools for AWS Lambda (.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.
Info
Supports .NET 6 and .NET 8 runtimes
TipPowertools is also available for Python, Java, and TypeScript.
Support this project by becoming a reference customer or sharing your workYou can choose to support us in three ways:
1) Become a reference customers. This gives us permission to list your company in our documentation.
2) Share your work. Blog posts, video, sample projects you used Powertools!
Features¶Core utilities such as Tracing, Logging, and Metrics will be available across all Powertools for AWS Lambda languages. Additional utilities are subjective to each language ecosystem and customer demand.
Utility Description 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) Parameters provides high-level functionality to retrieve one or multiple parameter values from AWS Systems Manager Parameter Store, AWS Secrets Manager, or Amazon DynamoDB. We also provide extensibility to bring your own providers. Idempotency The idempotency utility provides a simple solution to convert your Lambda functions into idempotent operations which are safe to retry. Batch Processing The batch processing utility handles partial failures when processing batches from Amazon SQS, Amazon Kinesis Data Streams, and Amazon DynamoDB Streams. Install¶Powertools for AWS Lambda (.NET) is 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.
AWS.Lambda.Powertools.Tracing:
dotnet add package AWS.Lambda.Powertools.Tracing
AWS.Lambda.Powertools.Logging:
dotnet add package AWS.Lambda.Powertools.Logging
AWS.Lambda.Powertools.Metrics:
dotnet add package AWS.Lambda.Powertools.Metrics
AWS.Lambda.Powertools.Parameters:
dotnet add package AWS.Lambda.Powertools.Parameters
AWS.Lambda.Powertools.Idempotency:
dotnet add package AWS.Lambda.Powertools.Idempotency
AWS.Lambda.Powertools.BatchProcessing:
dotnet add package AWS.Lambda.Powertools.BatchProcessing
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 for AWS Lambda (.NET) features that enables you to include in your project.
To use the SAM CLI, you need the following tools.
Once you have SAM CLI installed, follow the these steps to initialize a .NET 6 project using Powertools for AWS (.NET)
Select option 1 as your template source
Which template source would you like to use?
1 - AWS Quick Start Templates
2 - Custom Template Location
3. Select the Hello World Example with Powertools for AWS Lambda
template
Choose an AWS Quick Start application template
1 - Hello World Example
2 - Data processing
3 - Hello World Example with Powertools for AWS Lambda
4 - Multi-step workflow
5 - Scheduled task
6 - Standalone function
7 - Serverless API
Template: 3
Follow the rest of the prompts and give your project a name
Viola! You now have a SAM application pre-configured with Powertools!
Examples¶We have provided a few examples that should you how to use the each of the core Powertools for AWS Lambda (.NET) features.
Connect¶#dotnet
- Invite linkThere are many ways you can help us gain future investments to improve everyone's experience:
Becoming a reference customer¶Knowing which companies are using this library is important to help prioritize the project internally. The following companies, among others, use Powertools:
Tenets¶These are our core principles to guide our decision making.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4