Skip to content

Commit 92193e7

Browse files
authored
chore(docs): fix middy v4 version wording (#2301)
1 parent bf0aa4b commit 92193e7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/core/metrics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ You can add default dimensions to your metrics by passing them as parameters in
200200
=== "Middy middleware"
201201

202202
!!! tip "A note about Middy"
203-
Currently we support only Middy `v3.x` that you can install it by running `npm i @middy/core@~3`.
203+
Currently we support up to Middy `v4.x` that you can install it by running `npm i @middy/core@~4`.
204204
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"}.
205205

206206
```typescript hl_lines="24-26"

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ You can include Powertools for AWS Lambda (TypeScript) Lambda Layer using [AWS L
264264

265265
You can instrument your code with Powertools for AWS Lambda (TypeScript) in three different ways:
266266

267-
* **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.
267+
* **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.
268268
* **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.
269269
* **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.
270270

docs/utilities/idempotency.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ The configuration options for the `@idempotent` decorator are the same as the on
188188
### MakeHandlerIdempotent Middy middleware
189189

190190
!!! tip "A note about Middy"
191-
Currently we support only Middy `v3.x` that you can install it by running `npm i @middy/core@~3`.
191+
Currently we support Middy up to `v4.x` that you can install it by running `npm i @middy/core@~4`.
192192
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"}.
193193

194194
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.

0 commit comments

Comments
 (0)