diff --git a/docs/core/metrics.md b/docs/core/metrics.md index 83b170f65b..e4525d3c1a 100644 --- a/docs/core/metrics.md +++ b/docs/core/metrics.md @@ -200,7 +200,7 @@ You can add default dimensions to your metrics by passing them as parameters in === "Middy middleware" !!! tip "A note about Middy" - Currently we support only Middy `v3.x` that you can install it by running `npm i @middy/core@~3`. + Currently we support up to Middy `v4.x` that you can install it by running `npm i @middy/core@~4`. Check their docs to learn more about [Middy and its middleware stack](https://middy.js.org/docs/intro/getting-started){target="_blank"} as well as [best practices when working with Powertools](https://middy.js.org/docs/integrations/lambda-powertools#best-practices){target="_blank"}. ```typescript hl_lines="24-26" diff --git a/docs/index.md b/docs/index.md index f668ad1ac8..47ea41e2b6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -264,7 +264,7 @@ You can include Powertools for AWS Lambda (TypeScript) Lambda Layer using [AWS L You can instrument your code with Powertools for AWS Lambda (TypeScript) in three different ways: -* **Middy** middleware. It is the best choice if your existing code base relies on the [Middy 3.x](https://middy.js.org/docs/) middleware engine. Powertools for AWS Lambda (TypeScript) offers compatible Middy middleware to make this integration seamless. +* **Middy** middleware. It is the best choice if your existing code base relies on the [Middy 4.x](https://middy.js.org/docs/) middleware engine. Powertools for AWS Lambda (TypeScript) offers compatible Middy middleware to make this integration seamless. * **Method decorator**. Use [TypeScript method decorators](https://www.typescriptlang.org/docs/handbook/decorators.html#method-decorators) if you prefer writing your business logic using [TypeScript Classes](https://www.typescriptlang.org/docs/handbook/classes.html). If you aren’t using Classes, this requires the most significant refactoring. * **Manually**. It provides the most granular control. It’s the most verbose approach, with the added benefit of no additional dependency and no refactoring to TypeScript Classes. diff --git a/docs/utilities/idempotency.md b/docs/utilities/idempotency.md index 9629616bc1..60dcd7aae3 100644 --- a/docs/utilities/idempotency.md +++ b/docs/utilities/idempotency.md @@ -188,7 +188,7 @@ The configuration options for the `@idempotent` decorator are the same as the on ### MakeHandlerIdempotent Middy middleware !!! tip "A note about Middy" - Currently we support only Middy `v3.x` that you can install it by running `npm i @middy/core@~3`. + Currently we support Middy up to `v4.x` that you can install it by running `npm i @middy/core@~4`. Check their docs to learn more about [Middy and its middleware stack](https://middy.js.org/docs/intro/getting-started){target="_blank"} as well as [best practices when working with Powertools](https://middy.js.org/docs/integrations/lambda-powertools#best-practices){target="_blank"}. If you are using [Middy](https://middy.js.org){target="_blank"} as your middleware engine, you can use the `makeHandlerIdempotent` middleware to make your Lambda handler idempotent. Similar to the `makeIdempotent` function wrapper, you can quickly make your Lambda handler idempotent by initializing the `DynamoDBPersistenceLayer` class and using it with the `makeHandlerIdempotent` middleware.