Powertools for AWS Lambda (TypeScript) (original) (raw)

Homepage

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

You can use Powertools for AWS Lambda in both TypeScript and JavaScript code bases.


Adopt one, a few, or all industry practices. Progressively.
All features * ❤ Support this project

Become a public reference customer, share your work, contribute, use Lambda Layers, etc.
Support * Available languages

Powertools for AWS Lambda is also available in other languages
Python, Java, and .NET

Features

Powertools for AWS Lambda (TypeScript) is built as a modular toolkit, so you can pick and choose the utilities you want to use. The following table lists the available utilities, and links to their documentation.

Utility Description
Tracer Decorators and utilities to trace Lambda function handlers, and both synchronous and asynchronous functions
Logger Structured logging made easier, and a middleware to enrich structured logging with key Lambda context details
Metrics Custom Metrics created asynchronously via CloudWatch Embedded Metric Format (EMF)
Event Handler - AppSync Events Event Handler for AWS AppSync real-time events
Parameters High-level functions to retrieve one or more parameters from AWS SSM Parameter Store, AWS Secrets Manager, AWS AppConfig, and Amazon DynamoDB
Idempotency Class method decorator, Middy middleware, and function wrapper to make your Lambda functions idempotent and prevent duplicate execution based on payload content.
Batch Processing Utility to handle partial failures when processing batches from Amazon SQS, Amazon Kinesis Data Streams, and Amazon DynamoDB Streams.
JMESPath Functions Built-in JMESPath functions to easily deserialize common encoded JSON payloads in Lambda functions.
Parser Utility to parse and validate AWS Lambda event payloads using Zod, a TypeScript-first schema declaration and validation library.
Validation JSON Schema validation for events and responses, including JMESPath support to unwrap events before validation.

Examples

You can find examples of how to use Powertools for AWS Lambda (TypeScript) in the examples directory, which contains both code snippets for specific use cases, as well as a full example application.

If instead you want to see Powertools for AWS Lambda (TypeScript) in a more involved context, check the Powertools for AWS workshop where we demonstrate how to use toolkit in a more complex application.

There are many ways you can help us gain future investments to improve everyone's experience:


Add your company name and logo on our landing page, documentation, and README files.
GitHub Issue template * 📣 Share your work

Blog posts, video, and sample projects about Powertools for AWS Lambda.
GitHub Issue template * 🥳 Join the community

Connect, ask questions, and share what features you use.
Discord invite

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:

Using Lambda Layers

Layers help us understand who uses Powertools for AWS Lambda (TypeScript) in a non-intrusive way.

When using Layers, you can add Powertools for AWS Lambda (TypeScript) as a dev dependency to not impact the development process. For Layers, we pre-package all dependencies, compile and optimize for storage.

Tenets

These are our core principles to guide our decision making.