Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/DISCUSSION_TEMPLATE/rfcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ body:
attributes:
label: Acknowledgment
options:
- label: This RFC meets [Powertools for AWS Lambda (TypeScript) Tenets](https://docs.powertools.aws.dev/lambda/typescript/latest/#tenets)
- label: This RFC meets [Powertools for AWS Lambda (TypeScript) Tenets](https://docs.aws.amazon.com/powertools/typescript/latest/#tenets)
required: true
- label: Should this be considered in other Powertools for AWS Lambda languages? i.e. [Python](https://github.com/aws-powertools/powertools-lambda-python/), [Java](https://github.com/aws-powertools/powertools-lambda-java/), and [.NET](https://github.com/aws-powertools/powertools-lambda-dotnet/)
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ body:
attributes:
label: Acknowledgment
options:
- label: This feature request meets [Powertools for AWS Lambda (TypeScript) Tenets](https://docs.powertools.aws.dev/lambda/typescript/latest/#tenets)
- label: This feature request meets [Powertools for AWS Lambda (TypeScript) Tenets](https://docs.aws.amazon.com/powertools/typescript/latest/#tenets)
required: true
- label: Should this be considered in other Powertools for AWS Lambda languages? i.e. [Python](https://github.com/aws-powertools/powertools-lambda-python/), [Java](https://github.com/aws-powertools/powertools-lambda-java/), and [.NET](https://github.com/aws-powertools/powertools-lambda-dotnet/)
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ body:
attributes:
label: Acknowledgment
options:
- label: This request meets [Powertools for AWS Lambda (TypeScript) Tenets](https://docs.powertools.aws.dev/lambda/typescript/latest/#tenets)
- label: This request meets [Powertools for AWS Lambda (TypeScript) Tenets](https://docs.aws.amazon.com/powertools/typescript/latest/#tenets)
required: true
- label: Should this be considered in other Powertools for AWS Lambda languages? i.e. [Python](https://github.com/aws-powertools/powertools-lambda-python/), [Java](https://github.com/aws-powertools/powertools-lambda-java/), and [.NET](https://github.com/aws-powertools/powertools-lambda-dotnet/)
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Before creating the pull request, please make sure you do the following:
- Read the Contributing Guidelines at https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/CONTRIBUTING.md#sending-a-pull-request
- Check that there isn't already a PR that addresses the same issue. If you find a duplicate, please leave a comment under the existing PR so we can discuss how to move forward
- Check that the change meets the project's tenets https://docs.powertools.aws.dev/lambda/typescript/latest/#tenets
- Check that the change meets the project's tenets https://docs.aws.amazon.com/powertools/typescript/latest/#tenets
- Add a PR title that follows the conventional commit semantics - https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/.github/semantic.yml#L2
- If relevant, add tests that prove that the change is effective and works
- Whenever relevant, make sure to comment functions/methods/types and make appropriate changes to the documentation
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ If you have Python 3.x installed, you can run the documentation website and API
| Category | Convention |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Docstring** | We use [TypeDoc](https://typedoc.org) annotations to help generate more readable API references. For public APIs, we always include at least one **Example** to ease everyone's experience when using an IDE. |
| **Style guide** | We use [Biome](http://biomejs.dev) to enforce style and format beyond good practices. We use TypeScript types, function return types, and access modifiers to convey intent. |
| **Style guide** | We use [Biome](http://biomejs.dev) to enforce style and format beyond good practices. We use TypeScript types, function return types, and access modifiers to convey intent. |
| **Core utilities** | Core utilities always accept `serviceName` as a constructor parameter, can work in isolation, and are also available in other languages implementation. |
| **Utilities** | Utilities are not as strict as core and focus on community needs: development productivity, industry leading practices, etc. Both core and general utilities follow our [Tenets](https://docs.powertools.aws.dev/lambda/typescript/#tenets). |
| **Utilities** | Utilities are not as strict as core and focus on community needs: development productivity, industry leading practices, etc. Both core and general utilities follow our [Tenets](https://docs.aws.amazon.com/powertools/typescript/#tenets). |
| **Errors** | Specific errors thrown by Powertools live within utilities themselves and use `Error` suffix e.g. `IdempotencyKeyError`. |
| **Git commits** | We follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). We do not enforce conventional commits on contributors to lower the entry bar. Instead, we enforce a conventional PR title so our label automation and changelog are generated correctly. |
| **API documentation** | API reference docs are generated from docstrings which should have Examples section to allow developers to have what they need within their own IDE. Documentation website covers the wider usage, tips, and strive to be concise. |
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- markdownlint-disable MD041 -->

> [!IMPORTANT]
> Maintainers' playbook moved: <https://docs.powertools.aws.dev/lambda/typescript/latest/maintainers/>
> Maintainers' playbook moved: <https://docs.aws.amazon.com/powertools/typescript/latest/maintainers/>
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,39 @@

[![Discord](https://img.shields.io/badge/Discord-Join_Community-7289da.svg)](https://discord.gg/B8zZKbbyET)

Powertools for AWS Lambda (TypeScript) is a developer toolkit to implement Serverless [best practices and increase developer velocity](https://docs.powertools.aws.dev/lambda/typescript/latest/#features).
Powertools for AWS Lambda (TypeScript) is a developer toolkit to implement Serverless [best practices and increase developer velocity](https://docs.aws.amazon.com/powertools/typescript/latest/#features).

You can use the library in both TypeScript and JavaScript code bases.

> Also available in [Python](https://github.com/aws-powertools/powertools-lambda-python), [Java](https://github.com/aws-powertools/powertools-lambda-java), and [.NET](https://github.com/aws-powertools/powertools-lambda-dotnet).

**[Documentation](https://docs.powertools.aws.dev/lambda/typescript/latest)** | **[npmjs.com](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://docs.powertools.aws.dev/lambda/typescript/latest/roadmap)** | **[Examples](https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/examples)**
**[Documentation](https://docs.aws.amazon.com/powertools/typescript/latest)** | **[npmjs.com](https://www.npmjs.com/org/aws-lambda-powertools)** | **[Roadmap](https://docs.aws.amazon.com/powertools/typescript/latest/roadmap)** | **[Examples](https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/examples)**

## Features

Find the complete project's [documentation here](https://docs.powertools.aws.dev/lambda/typescript/latest).
Find the complete project's [documentation here](https://docs.aws.amazon.com/powertools/typescript/latest).

- **[Tracer](https://docs.powertools.aws.dev/lambda/typescript/latest/features/tracer/)** - Utilities to trace Lambda function handlers, and both synchronous and asynchronous functions
- **[Logger](https://docs.powertools.aws.dev/lambda/typescript/latest/features/logger/)** - Structured logging made easier, and a middleware to enrich log items with key details of the Lambda context
- **[Metrics](https://docs.powertools.aws.dev/lambda/typescript/latest/features/metrics/)** - Custom Metrics created asynchronously via CloudWatch Embedded Metric Format (EMF)
- **[Event Handler](https://docs.powertools.aws.dev/lambda/typescript/latest/features/event-handler/)** - Lightweight routing to reduce boilerplate for API Gateway REST/HTTP API, ALB and Lambda Function URLs
- **[Parameters](https://docs.powertools.aws.dev/lambda/typescript/latest/features/parameters/)** - High-level functions to retrieve one or more parameters from AWS SSM Parameter Store, AWS Secrets Manager, AWS AppConfig, and Amazon DynamoDB
- **[Idempotency](https://docs.powertools.aws.dev/lambda/typescript/latest/features/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](https://docs.powertools.aws.dev/lambda/typescript/latest/features/batch/)** - Utility to handle partial failures when processing batches from Amazon SQS, Amazon Kinesis Data Streams, and Amazon DynamoDB Streams.
- **[JMESPath Functions](https://docs.powertools.aws.dev/lambda/typescript/latest/features/jmespath/)** - Built-in JMESPath functions to easily deserialize common encoded JSON payloads in Lambda functions.
- **[Parser (Zod)](https://docs.powertools.aws.dev/lambda/typescript/latest/features/parser/)** - Utility that provides data validation and parsing using Zod, a TypeScript-first schema declaration and validation library.
- **[Validation](https://docs.powertools.aws.dev/lambda/typescript/latest/features/validation/)** - JSON Schema validation for events and responses, including JMESPath support to unwrap events before validation.
- **[Tracer](https://docs.aws.amazon.com/powertools/typescript/latest/features/tracer/)** - Utilities to trace Lambda function handlers, and both synchronous and asynchronous functions
- **[Logger](https://docs.aws.amazon.com/powertools/typescript/latest/features/logger/)** - Structured logging made easier, and a middleware to enrich log items with key details of the Lambda context
- **[Metrics](https://docs.aws.amazon.com/powertools/typescript/latest/features/metrics/)** - Custom Metrics created asynchronously via CloudWatch Embedded Metric Format (EMF)
- **[Event Handler](https://docs.aws.amazon.com/powertools/typescript/latest/features/event-handler/)** - Lightweight routing to reduce boilerplate for API Gateway REST/HTTP API, ALB and Lambda Function URLs
- **[Parameters](https://docs.aws.amazon.com/powertools/typescript/latest/features/parameters/)** - High-level functions to retrieve one or more parameters from AWS SSM Parameter Store, AWS Secrets Manager, AWS AppConfig, and Amazon DynamoDB
- **[Idempotency](https://docs.aws.amazon.com/powertools/typescript/latest/features/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](https://docs.aws.amazon.com/powertools/typescript/latest/features/batch/)** - Utility to handle partial failures when processing batches from Amazon SQS, Amazon Kinesis Data Streams, and Amazon DynamoDB Streams.
- **[JMESPath Functions](https://docs.aws.amazon.com/powertools/typescript/latest/features/jmespath/)** - Built-in JMESPath functions to easily deserialize common encoded JSON payloads in Lambda functions.
- **[Parser (Zod)](https://docs.aws.amazon.com/powertools/typescript/latest/features/parser/)** - Utility that provides data validation and parsing using Zod, a TypeScript-first schema declaration and validation library.
- **[Validation](https://docs.aws.amazon.com/powertools/typescript/latest/features/validation/)** - JSON Schema validation for events and responses, including JMESPath support to unwrap events before validation.

## Install

You can use Powertools for AWS Lambda (TypeScript) by installing it with your favorite dependency management, or [via Lambda Layers](https://docs.powertools.aws.dev/lambda/typescript/latest/getting-started/lambda-layers/). All features are available as individual packages, so you can install only the ones you need, for example:
You can use Powertools for AWS Lambda (TypeScript) by installing it with your favorite dependency management, or [via Lambda Layers](https://docs.aws.amazon.com/powertools/typescript/latest/getting-started/lambda-layers/). All features are available as individual packages, so you can install only the ones you need, for example:

- **Logger**: `npm install @aws-lambda-powertools/logger`
- **Metrics**: `npm install @aws-lambda-powertools/metrics`
- **Tracer**: `npm install @aws-lambda-powertools/tracer`
- **Event Handler**: `npm install @aws-lambda-powertools/event-handler`
- **Parameters**: `npm install @aws-lambda-powertools/parameters @aws-sdk/client-ssm` see [documentation](https://docs.powertools.aws.dev/lambda/typescript/latest/features/parameters/#installation) for other providers
- **Idempotency**: `npm install @aws-lambda-powertools/idempotency @aws-sdk/client-dynamodb @aws-sdk/lib-dynamodb` see [documentation](https://docs.powertools.aws.dev/lambda/typescript/latest/features/idempotency/#installation) for other providers
- **Parameters**: `npm install @aws-lambda-powertools/parameters @aws-sdk/client-ssm` see [documentation](https://docs.aws.amazon.com/powertools/typescript/latest/features/parameters/#installation) for other providers
- **Idempotency**: `npm install @aws-lambda-powertools/idempotency @aws-sdk/client-dynamodb @aws-sdk/lib-dynamodb` see [documentation](https://docs.aws.amazon.com/powertools/typescript/latest/features/idempotency/#installation) for other providers
- **Batch Processing**: `npm install @aws-lambda-powertools/batch`
- **JMESPath Functions**: `npm install @aws-lambda-powertools/jmespath`
- **Parser**: `npm install @aws-lambda-powertools/parser zod@~3`
Expand Down Expand Up @@ -82,11 +82,11 @@ The following companies, among others, use Powertools:

### Sharing your work

Share what you did with Powertools for AWS Lambda (TypeScript) 💞💞. Blog post, workshops, presentation, sample apps and others. Check out what the community has [already shared](https://docs.powertools.aws.dev/lambda/typescript/latest/we_made_this) about Powertools for AWS Lambda (TypeScript).
Share what you did with Powertools for AWS Lambda (TypeScript) 💞💞. Blog post, workshops, presentation, sample apps and others. Check out what the community has [already shared](https://docs.aws.amazon.com/powertools/typescript/latest/we_made_this) about Powertools for AWS Lambda (TypeScript).

### Using Lambda Layer

This helps us understand who uses Powertools for AWS Lambda (Typescript) in a non-intrusive way, and helps us gain future investments for other Powertools for AWS Lambda languages. When [using Layers](https://docs.powertools.aws.dev/lambda/typescript/latest/getting-started/lambda-layers/), you can add Powertools for AWS Lambda as a dev dependency to not impact the development process.
This helps us understand who uses Powertools for AWS Lambda (Typescript) in a non-intrusive way, and helps us gain future investments for other Powertools for AWS Lambda languages. When [using Layers](https://docs.aws.amazon.com/powertools/typescript/latest/getting-started/lambda-layers/), you can add Powertools for AWS Lambda as a dev dependency to not impact the development process.

## Credits

Expand Down
4 changes: 2 additions & 2 deletions docs/contributing/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ As we gather more concrete examples, this page will have one section for each ca
| Category | Convention |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Docstring** | We use [TypeDoc](https://typedoc.org){target="_blank"} annotations to help generate more readable API references. For public APIs, we always include at least one **Example** to ease everyone's experience when using an IDE. |
| **Style guide** | We use [Biome](http://biomejs.dev){target="_blank"} for linting and formatting to enforce beyond good practices. We use TypeScript types, function return types, and access modifiers to convey intent. |
| **Style guide** | We use [Biome](http://biomejs.dev){target="_blank"} for linting and formatting to enforce beyond good practices. We use TypeScript types, function return types, and access modifiers to convey intent. |
| **Core utilities** | Core utilities always accept `serviceName` as a constructor parameter, can work in isolation, and are also available in other languages implementation. |
| **Utilities** | Utilities are not as strict as core and focus on community needs: development productivity, industry leading practices, etc. Both core and general utilities follow our [Tenets](https://docs.powertools.aws.dev/lambda/typescript/#tenets){target="_blank"}. |
| **Utilities** | Utilities are not as strict as core and focus on community needs: development productivity, industry leading practices, etc. Both core and general utilities follow our [Tenets](https://docs.aws.amazon.com/powertools/typescript/#tenets){target="_blank"}. |
| **Errors** | Specific errors thrown by Powertools live within utilities themselves and use `Error` suffix e.g. `IdempotencyKeyError`. |
| **Git commits** | We follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/){target="_blank"}. We do not enforce conventional commits on contributors to lower the entry bar. Instead, we enforce a conventional PR title so our label automation and changelog are generated correctly. |
| **API documentation** | API reference docs are generated from docstrings which should have Examples section to allow developers to have what they need within their own IDE. Documentation website covers the wider usage, tips, and strive to be concise. |
Expand Down
Loading
Loading