Skip to content

About

Powertools is a developer toolkit to implement Serverless best practices and increase developer velocity.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

180 stars

Watchers

4 watching

Forks

Latest commit

Β 

History

2,465 Commits

Folders and files

Repository files navigation

Powertools for AWS Lambda (.NET)

aws provider Build codecov.io dotnet support NuGet Downloads OpenSSF Scorecard Discord

Powertools for AWS Lambda (.NET) is a developer toolkit to implement Serverless best practices and increase developer velocity.

Also available in Python, TypeScript, and Java.

πŸ“œ Documentation | NuGet | Roadmap | Examples

Features

Core utilities:

  • Logging - structured JSON logging with Lambda context, cold start, correlation IDs, custom keys and optional event logging. Works with ILogger, ASP.NET Core and Native AOT.

  • Metrics - custom metrics written asynchronously with CloudWatch Embedded Metric Format (EMF), with no synchronous calls to CloudWatch. AWS.Lambda.Powertools.Metrics.AspNetCore adds middleware and endpoint filters for ASP.NET Core.

  • Tracing - AWS X-Ray tracing for your handler, AWS SDK calls and outbound HTTP requests, with a ColdStart annotation added for you and support for custom annotations and metadata.

Event handlers:

  • AppSync Events - route AWS AppSync Events publish and subscribe operations to handlers by channel path, with support for wildcards and aggregated processing.

  • Bedrock Agent Functions - register tools for Amazon Bedrock Agents and let the resolver handle parameter binding and response formatting. Also available for ASP.NET Core.

Utilities:

  • Parameters - retrieve and cache values from AWS Systems Manager Parameter Store, AWS Secrets Manager, AWS AppConfig or Amazon DynamoDB, or bring your own provider.

  • Idempotency - make Lambda functions safe to retry by storing results in Amazon DynamoDB and returning them for repeated events.

  • Batch Processing - handle partial failures when processing batches from Amazon SQS, Amazon Kinesis Data Streams and Amazon DynamoDB Streams.

  • Kafka Consumer - deserialize Avro, Protobuf and JSON keys and values from Amazon MSK and self-managed Apache Kafka events, with Schema Registry support.

  • JMESPath Functions - extract data from event payloads with JMESPath, including built-in functions to decode JSON strings, base64 and compressed data.

  • Lambda Metadata - read execution environment metadata, such as the Availability Zone ID, from the Lambda Metadata Endpoint, cached for the lifetime of the execution environment.

Installation

The utilities are published as separate NuGet packages, so you only install what you use. Browse them on the NuGet Gallery or install with dotnet add package:

Utility Package
Logging AWS.Lambda.Powertools.Logging
Metrics AWS.Lambda.Powertools.Metrics
Metrics for ASP.NET Core AWS.Lambda.Powertools.Metrics.AspNetCore
Tracing AWS.Lambda.Powertools.Tracing
AppSync Events AWS.Lambda.Powertools.EventHandler
Bedrock Agent Functions AWS.Lambda.Powertools.EventHandler.Resolvers.BedrockAgentFunction
Bedrock Agent Functions for ASP.NET Core AWS.Lambda.Powertools.EventHandler.Resolvers.BedrockAgentFunction.AspNetCore
Parameters AWS.Lambda.Powertools.Parameters
Idempotency AWS.Lambda.Powertools.Idempotency
Batch Processing AWS.Lambda.Powertools.BatchProcessing
Kafka Consumer (Avro) AWS.Lambda.Powertools.Kafka.Avro
Kafka Consumer (Protobuf) AWS.Lambda.Powertools.Kafka.Protobuf
Kafka Consumer (JSON) AWS.Lambda.Powertools.Kafka.Json
JMESPath Functions AWS.Lambda.Powertools.JMESPath
Lambda Metadata AWS.Lambda.Powertools.Metadata

For example:

dotnet add package AWS.Lambda.Powertools.Logging

Examples

Each utility's documentation includes code examples. They're kept in docs/snippets and compiled against the libraries on every change.

Other members of the Powertools for AWS Lambda family

Not using .NET? No problem, we have you covered. Here are the other members of the Powertools for AWS Lambda family:

How to support Powertools for AWS Lambda (.NET)?

Becoming a reference customer

Knowing which companies are using this library is important to help prioritize the project internally. If your company is using Powertools for AWS Lambda (.NET), you can request to have your name and logo added to the README file by raising a Support Powertools for AWS Lambda (.NET) (become a reference) issue.

The following companies, among others, use Powertools:

Sharing your work

Share what you built with Powertools for AWS Lambda (.NET): blog posts, workshops, talks, sample apps and more. See what the community has already shared on the We Made This page.

πŸ‘‹ Contributing

We welcome contributions from developers of all levels. Read the contributing guidelines to get started, and look for issues labelled good first issue or help wanted.

Star History Chart

Credits

Connect

Security disclosures

If you think you've found a potential security issue, please do not post it in the Issues. Instead, please follow the AWS vulnerability reporting instructions or email AWS security directly.

License

This project is licensed under the Apache-2.0 License.

About

Powertools is a developer toolkit to implement Serverless best practices and increase developer velocity.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

180 stars

Watchers

4 watching

Forks

Releases

Used by

Contributors

Languages