Skip to content

Commit 56d1ea3

Browse files
committed
improv(docs): add getting started sections
1 parent 1e330b3 commit 56d1ea3

19 files changed

+79
-24
lines changed
File renamed without changes.
File renamed without changes.

docs/features/index.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Features
3+
description: Features of Powertools for AWS Lambda
4+
---
5+
6+
<!-- markdownlint-disable MD043 -->
7+
8+
Stuff
File renamed without changes.

docs/core/logger.md renamed to docs/features/logger.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ These settings will be used across all logs emitted:
5656
???+ info
5757
When `POWERTOOLS_DEV` environment variable is present and set to `"true"` or `"1"`, Logger will pretty-print log messages for easier readability. We recommend to use this setting only when debugging on local environments.
5858

59-
See all environment variables in the [Environment variables](../index.md/#environment-variables) section.
59+
See all environment variables in the [Environment variables](../index.md#environment-variables) section.
6060
Check API docs to learn more about [Logger constructor options](https://docs.powertools.aws.dev/lambda/typescript/latest/api/types/_aws_lambda_powertools_logger.types.ConstructorOptions.html){target="_blank"}.
6161

6262
#### Example using AWS Serverless Application Model (SAM)
File renamed without changes.

docs/utilities/parameters.md renamed to docs/features/parameters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ You can use the `awsSdkV3Client` parameter via any of the available [Provider Cl
413413
| [DynamoDBProvider](#dynamodbprovider) | `new DynamoDBClient();` |
414414

415415
???+ question "When is this useful?"
416-
Injecting a custom AWS SDK v3 client allows you to [apply tracing](../core/tracer.md#patching-aws-sdk-clients) or make unit/snapshot testing easier, including SDK customizations.
416+
Injecting a custom AWS SDK v3 client allows you to [apply tracing](../features/tracer.md#patching-aws-sdk-clients) or make unit/snapshot testing easier, including SDK customizations.
417417

418418
=== "SSMProvider"
419419
```typescript hl_lines="5 7"
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/getting-started/index.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Getting Started
3+
description: A guide to using Powertools for AWS Lambda with TypeScript
4+
---
5+
6+
<!-- markdownlint-disable MD043 -->
7+
8+
Stuff

docs/getting-started/installation.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Installation
3+
description: Installing Powertools for AWS Lambda
4+
---
5+
6+
<!-- markdownlint-disable MD043 -->
7+
8+
Stuff

docs/getting-started/lambda-layers.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Lambda layers
3+
description: Using Powertools for AWS Lambda with Lambda layers
4+
---
5+
6+
<!-- markdownlint-disable MD043 -->
7+
8+
Stuff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Navigating the Toolkit
3+
description: Getting to know the Powertools for AWS Lambda Toolkit
4+
---
5+
6+
<!-- markdownlint-disable MD043 -->
7+
8+
Stuff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Typescript Settings
3+
description: Configuration settings for using Powertools with TypeScript
4+
---
5+
6+
<!-- markdownlint-disable MD043 -->
7+
8+
Stuff

docs/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,9 @@ Core utilities such as Tracing, Logging, and Metrics will be available across al
349349

350350
| Utility | Description |
351351
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
352-
| [Tracer](./core/tracer.md) | Decorators and utilities to trace Lambda function handlers, and both synchronous and asynchronous functions |
353-
| [Logger](./core/logger.md) | Structured logging made easier, and a middleware to enrich structured logging with key Lambda context details |
354-
| [Metrics](./core/metrics.md) | Custom Metrics created asynchronously via CloudWatch Embedded Metric Format (EMF) |
352+
| [Tracer](./features/tracer.md) | Decorators and utilities to trace Lambda function handlers, and both synchronous and asynchronous functions |
353+
| [Logger](./features/logger.md) | Structured logging made easier, and a middleware to enrich structured logging with key Lambda context details |
354+
| [Metrics](./features/metrics.md) | Custom Metrics created asynchronously via CloudWatch Embedded Metric Format (EMF) |
355355
| [Parameters](./utilities/parameters.md) | High-level functions to retrieve one or more parameters from AWS SSM Parameter Store, AWS Secrets Manager, AWS AppConfig, and Amazon DynamoDB |
356356
| [Idempotency](./utilities/idempotency.md) | Class method decorator, Middy middleware, and function wrapper to make your Lambda functions idempotent and prevent duplicate execution based on payload content. |
357357
| [Batch Processing](./utilities/batch.md) | Utility to handle partial failures when processing batches from Amazon SQS, Amazon Kinesis Data Streams, and Amazon DynamoDB Streams. |

docs/upgrade.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ V2 is focused on official support for ESM (ECMAScript modules). We've made other
2222
| **ESM support** | Added ESM support via dual CommonJS and ESM bundling, enabling top-level `await` and tree-shaking. | - |
2323
| **Middy.js** | Updated import path for Middy.js middlewares to leverage subpath exports - i.e. `@aws-lambda-powertools/tracer/middleware`. | Yes |
2424
| **Types imports** | Updated import path for TypeScript types to leverage subpath exports - i.e. `@aws-lambda-powertools/logger/types`. | Yes |
25-
| **Logger** | Changed [log sampling](./core/logger.md#sampling-debug-logs) to dynamically switch log level to `DEBUG` on a percentage of requests. | - |
25+
| **Logger** | Changed [log sampling](./features/logger.md#sampling-debug-logs) to dynamically switch log level to `DEBUG` on a percentage of requests. | - |
2626
| **Logger** | Updated [custom log formatter](#custom-log-formatter) to include standard as well as persistent keys. | Yes |
2727
| **Logger** | Removed `ContextExamples` from `@aws-lambda-powertools/commons` package. | Yes |
2828
| **Logger and Tracer** | Removed deprecated `createLogger` and `createTracer` helper functions in favor of direct instantiation. | Yes |
@@ -198,7 +198,7 @@ Below is an example of how to configure your `.eslintrc.json` file:
198198

199199
### Log sampling
200200

201-
!!! note "Disregard if you are not using the [log sampling feature](./core/logger.md#sampling-debug-logs)."
201+
!!! note "Disregard if you are not using the [log sampling feature](./features/logger.md#sampling-debug-logs)."
202202

203203
In v1, log sampling implementation was inconsistent from other Powertools for AWS Lambda languages _(Python, .NET, and Java)_.
204204

@@ -213,11 +213,11 @@ Logger `sampleRateValue` **continues** to determine the percentage of concurrent
213213

214214
### Custom log formatter
215215

216-
!!! note "Disregard if you are not customizing log output with a [custom log formatter](./core/logger.md#custom-log-formatter)."
216+
!!! note "Disregard if you are not customizing log output with a [custom log formatter](./features/logger.md#custom-log-formatter)."
217217

218-
In v1, `Logger` exposed the [standard](./core/logger.md#standard-structured-keys) as a single argument, _e.g., `formatAttributes(attributes: UnformattedAttributes)`_. It expected a plain object with keys and values you wanted in the final log output.
218+
In v1, `Logger` exposed the [standard](./features/logger.md#standard-structured-keys) as a single argument, _e.g., `formatAttributes(attributes: UnformattedAttributes)`_. It expected a plain object with keys and values you wanted in the final log output.
219219

220-
In v2, you have more control over **standard** (`attributes`) and [**custom keys**](./core/logger.md#appending-additional-keys) (`additionalLogAttributes`) in the `formatAttributes` method. Also, you now return a `LogItem` object to increase type safety when defining the final log output.
220+
In v2, you have more control over **standard** (`attributes`) and [**custom keys**](./features/logger.md#appending-additional-keys) (`additionalLogAttributes`) in the `formatAttributes` method. Also, you now return a `LogItem` object to increase type safety when defining the final log output.
221221

222222
=== "Before"
223223

@@ -305,7 +305,7 @@ In v2, you have more control over **standard** (`attributes`) and [**custom keys
305305
export { MyCompanyLogFormatter };
306306
```
307307

308-
1. This new argument contains all [your custom keys](./core/logger.md#appending-additional-keys).
308+
1. This new argument contains all [your custom keys](./features/logger.md#appending-additional-keys).
309309
2. `LogItem` is the new return object instead of a plain object.
310310
3. If you prefer adding at the initialization, use: <br/><br/> **`LogItem({persistentAttributes: additionalLogAttributes, attributes: baseAttributes})`**
311311

mkdocs.yml

+20-13
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,29 @@ watch: [
3232
nav:
3333
- Homepage:
3434
- index.md
35+
- Getting Started:
36+
- getting-started/index.md
37+
- Navigating the toolkit: getting-started/navigating-the-toolkit.md
38+
- Installation: getting-started/installation.md
39+
- TypeScript settings: getting-started/typescript-settings.md
40+
- Lambda layers: getting-started/lambda-layers.md
41+
- Workshop: https://s12d.com/powertools-for-aws-lambda-workshop" target="_blank
42+
- Features:
43+
- features/index.md
44+
- features/tracer.md
45+
- features/logger.md
46+
- features/metrics.md
47+
- features/parameters.md
48+
- features/idempotency.md
49+
- features/batch.md
50+
- features/jmespath.md
51+
- features/parser.md
52+
- features/validation.md
3553
- Changelog: changelog.md
3654
- Upgrade guide: upgrade.md
37-
- We Made This (Community): we_made_this.md
38-
- Workshop: https://s12d.com/powertools-for-aws-lambda-workshop" target="_blank
55+
- Community Content: we_made_this.md
3956
- Roadmap: roadmap.md
40-
- Features:
41-
- core/tracer.md
42-
- core/logger.md
43-
- core/metrics.md
44-
- utilities/parameters.md
45-
- utilities/idempotency.md
46-
- utilities/batch.md
47-
- utilities/jmespath.md
48-
- utilities/parser.md
49-
- utilities/validation.md
50-
- API reference: api"
57+
- API reference: api/" target="_blank
5158
- Processes:
5259
- Roadmap: roadmap.md
5360
- Versioning policy: versioning.md

0 commit comments

Comments
 (0)