You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started/installation.md
+12-9Lines changed: 12 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ The toolkit is compatible with both TypeScript and JavaScript code bases, and su
12
12
All features are available as individual packages, so you can install only the ones you need, for example:
13
13
14
14
***Logger**: `npm i @aws-lambda-powertools/logger`{.copyMe}
15
+
***Event Handler**: `npm i @aws-lambda-powertools/event-handler`{.copyMe}
15
16
***Metrics**: `npm i @aws-lambda-powertools/metrics`{.copyMe}
16
17
***Tracer**: `npm i @aws-lambda-powertools/tracer`{.copyMe}
17
18
@@ -21,12 +22,14 @@ See the [Features](../features/index.md) page for a complete list of available u
21
22
22
23
Some features use additional dependencies like the AWS SDK for JavaScript v3, which might you need to install separately. Below is a list of utilities that use external dependencies, and the packages you need to install to use them.
When using the Lambda Layer, the Powertools for AWS Lambda packages are already included in your Lambda runtime environment. However, you still need to [install these packages](./installation.md) locally for development, testing, and IDE support.
353
+
354
+
Since the packages are provided by the Lambda Layer at runtime, install them as `devDependencies` in your `package.json` file:
355
+
356
+
```bash title="Install Powertools for AWS Lambda packages"
357
+
npm i -D @aws-lambda-powertools/logger
358
+
```
359
+
360
+
**Important considerations:**
361
+
362
+
-**Exclude from bundling**: Ensure your build process excludes these packages from your deployment bundle since they're provided by the layer
363
+
-**Version synchronization**: Keep your local development dependencies in sync with the Lambda Layer version to maintain consistency
364
+
365
+
Following these practices prevents version conflicts that can cause unexpected behavior, such as failed `instanceof` checks or inconsistent behavior between your local development environment and the Lambda execution environment.
0 commit comments