Skip to content

Commit b3afbf8

Browse files
committed
address PR comments
1 parent 8cda1a4 commit b3afbf8

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

docs/features/event-handler/rest.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ status: new
55
---
66

77
!!! warning "Feature status"
8-
This feature is under active development and may undergo significant changes. We recommend using it in non-critical workloads and [providing feedback](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose) to help us improve it.
8+
This feature is under active development and may undergo significant changes. We recommend using it in non-critical workloads and [providing feedback](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose){target="_blank"} to help us improve it.
99

1010
Event handler for Amazon API Gateway REST and HTTP APIs, Application Loader Balancer (ALB), Lambda Function URLs, and VPC Lattice.
1111

@@ -48,7 +48,7 @@ When a request is received, the event handler will automatically convert the eve
4848

4949
#### Response auto-serialization
5050

51-
!!! tip "Want full control over the response, headers, and status code? Read about the `Response` object here."
51+
!!! tip "Want full control over the response, headers, and status code? Read about it in the [Fine grained responses](#fine-grained-responses) section."
5252

5353
For your convenience, when you return a JavaScript object from your route handler, we automatically perform these actions:
5454

@@ -121,7 +121,7 @@ If you need to accept multiple HTTP methods in a single function, or support an
121121
### Data validation
122122

123123
!!! note "Coming soon"
124-
Please open an issue if you would like us to prioritize this feature.
124+
Please [open an issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose) if you would like us to prioritize this feature.
125125

126126
### Accessing request details
127127

@@ -130,27 +130,27 @@ You can access request details such as headers, query parameters, and body using
130130
### Handling not found routes
131131

132132
!!! note "Coming soon"
133-
Please open an issue if you would like us to prioritize this feature.
133+
Please [open an issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose){target="_blank"} if you would like us to prioritize this feature.
134134

135135
### Error handling
136136

137137
!!! note "Coming soon"
138-
Please open an issue if you would like us to prioritize this feature.
138+
Please [open an issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose){target="_blank"} if you would like us to prioritize this feature.
139139

140140
### Throwing HTTP errors
141141

142142
!!! note "Coming soon"
143-
Please open an issue if you would like us to prioritize this feature.
143+
Please [open an issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose){target="_blank"} if you would like us to prioritize this feature.
144144

145145
### Enabling SwaggerUI
146146

147147
!!! note "Coming soon"
148-
Please open an issue if you would like us to prioritize this feature.
148+
Please [open an issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose){target="_blank"} if you would like us to prioritize this feature.
149149

150150
### Custom domains
151151

152152
!!! note "Coming soon"
153-
Please open an issue if you would like us to prioritize this feature.
153+
Please [open an issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose){target="_blank"} if you would like us to prioritize this feature.
154154

155155
## Advanced
156156

@@ -478,14 +478,14 @@ example, you might want to add additional headers, cookies, or set a custom cont
478478
### Response streaming
479479

480480
!!! note "Coming soon"
481-
Please open an issue if you would like us to prioritize this feature.
481+
Please [open an issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose) if you would like us to prioritize this feature.
482482

483483
### Compress
484484

485485
You can compress with gzip and base64 encode your responses via the `compress` parameter. You have the option to pass the `compress` parameter when working with a specific route or setting the correct `Accept-Encoding` header in the `Response` object.
486486

487487
!!! note "Coming soon"
488-
Please open an issue if you would like us to prioritize this feature.
488+
Please [open an issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose) if you would like us to prioritize this feature.
489489

490490
### Binary responses
491491

@@ -500,7 +500,7 @@ Like the `compress` feature, the client must send the `Accept` header with the c
500500
Lambda Function URLs handle binary media types automatically.
501501

502502
!!! note "Coming soon"
503-
Please open an issue if you would like us to prioritize this feature.
503+
Please [open an issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose) if you would like us to prioritize this feature.
504504

505505
### Debug mode
506506

@@ -509,7 +509,7 @@ You can enable debug mode via the `POWERTOOLS_DEV` environment variable.
509509
This will enable full stack traces errors in the response, log request and responses, and set CORS in development mode.
510510

511511
!!! note "Coming soon"
512-
Please open an issue if you would like us to prioritize this feature.
512+
Please [open an issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose) if you would like us to prioritize this feature.
513513

514514
### OpenAPI
515515

@@ -518,14 +518,14 @@ When you enable [Data Validation](#data-validation), we use a combination of Zod
518518
In OpenAPI documentation tools like [SwaggerUI](#enabling-swaggerui), these annotations become readable descriptions, offering a self-explanatory API interface. This reduces boilerplate code while improving functionality and enabling auto-documentation.
519519

520520
!!! note "Coming soon"
521-
Please open an issue if you would like us to prioritize this feature.
521+
Please [open an issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose) if you would like us to prioritize this feature.
522522

523523
### Split routers
524524

525525
As you grow the number of routes a given Lambda function should handle, it is natural to either break into smaller Lambda functions, or split routes into separate files to ease maintenance - that's where the split `Router` feature is useful.
526526

527527
!!! note "Coming soon"
528-
Please open an issue if you would like us to prioritize this feature.
528+
Please [open an issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose) if you would like us to prioritize this feature.
529529

530530
### Considerations
531531

@@ -554,7 +554,7 @@ _**Downsides**_
554554

555555
* **Cold starts.** Frequent deployments and/or high load can diminish the benefit of monolithic functions depending on your latency requirements, due to the [Lambda scaling model](https://docs.aws.amazon.com/lambda/latest/dg/invocation-scaling.html){target="_blank"}. Always load test to find a pragmatic balance between customer experience and developer cognitive load.
556556
* **Granular security permissions.** The micro function approach enables you to use fine-grained permissions and access controls, separate external dependencies and code signing at the function level. Conversely, you could have multiple functions while duplicating the final code artifact in a monolithic approach. Regardless, least privilege can be applied to either approaches.
557-
* **Higher risk per deployment.** A misconfiguration or invalid import can cause disruption if not caught early in automated testing. Multiple functions can mitigate misconfigurations but they will uld still share the same code artifact. You can further minimize risks with multiple environments in your CI/CD pipeline.
557+
* **Higher risk per deployment.** A misconfiguration or invalid import can cause disruption if not caught early in automated testing. Multiple functions can mitigate misconfigurations but they will still share the same code artifact. You can further minimize risks with multiple environments in your CI/CD pipeline.
558558

559559
#### Micro function
560560

@@ -564,16 +564,16 @@ A micro function means that your final code artifact will be different to each f
564564

565565
_**Benefits**_
566566

567-
**Granular scaling.** A micro function can benefit from the [Lambda scaling model](https://docs.aws.amazon.com/lambda/latest/dg/invocation-scaling.html){target="_blank"} to scale differently depending on each part of your application. Concurrency controls and provisioned concurrency can also be used at a granular level for capacity management.
568-
**Discoverability.** Micro functions are easier to visualize when using distributed tracing. Their high-level architectures can be self-explanatory, and complexity is highly visible — assuming each function is named after the business purpose it serves.
569-
**Package size.** An independent function can be significantly smaller (KB vs MB) depending on the external dependencies it requires to perform its purpose. Conversely, a monolithic approach can benefit from [Lambda Layers](https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html){target="_blank"} to optimize builds for external dependencies.
567+
* **Granular scaling.** A micro function can benefit from the [Lambda scaling model](https://docs.aws.amazon.com/lambda/latest/dg/invocation-scaling.html){target="_blank"} to scale differently depending on each part of your application. Concurrency controls and provisioned concurrency can also be used at a granular level for capacity management.
568+
* **Discoverability.** Micro functions are easier to visualize when using distributed tracing. Their high-level architectures can be self-explanatory, and complexity is highly visible — assuming each function is named after the business purpose it serves.
569+
* **Package size.** An independent function can be significantly smaller (KB vs MB) depending on the external dependencies it requires to perform its purpose. Conversely, a monolithic approach can benefit from [Lambda Layers](https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html){target="_blank"} to optimize builds for external dependencies.
570570

571571
_**Downsides**_
572572

573-
**Upfront investment.** You need custom build tooling to bundle assets, including [native bindings for runtime compatibility](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html){target="_blank"}. Operations become more elaborate — you need to standardize tracing labels/annotations, structured logging, and metrics to pinpoint root causes.
574-
**Engineering discipline** is necessary for both approaches. However, the micro-function approach requires further attention to consistency as the number of functions grow, just like any distributed system.
575-
**Harder to share code.** Shared code must be carefully evaluated to avoid unnecessary deployments when this code changes. Equally, if shared code isn't a library, your development, building, deployment tooling need to accommodate the distinct layout.
576-
**Slower safe deployments.** Safely deploying multiple functions require coordination — AWS CodeDeploy deploys and verifies each function sequentially. This increases lead time substantially (minutes to hours) depending on the deployment strategy you choose. You can mitigate it by selectively enabling it in prod-like environments only, and where the risk profile is applicable.
573+
* **Upfront investment.** You need custom build tooling to bundle assets, including [native bindings for runtime compatibility](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html){target="_blank"}. Operations become more elaborate — you need to standardize tracing labels/annotations, structured logging, and metrics to pinpoint root causes.
574+
* **Engineering discipline** is necessary for both approaches. However, the micro-function approach requires further attention to consistency as the number of functions grow, just like any distributed system.
575+
* **Harder to share code.** Shared code must be carefully evaluated to avoid unnecessary deployments when this code changes. Equally, if shared code isn't a library, your development, building, deployment tooling need to accommodate the distinct layout.
576+
* **Slower safe deployments.** Safely deploying multiple functions require coordination — AWS CodeDeploy deploys and verifies each function sequentially. This increases lead time substantially (minutes to hours) depending on the deployment strategy you choose. You can mitigate it by selectively enabling it in prod-like environments only, and where the risk profile is applicable.
577577
Automated testing, operational and security reviews are essential to stability in either approaches.
578578

579579
## Testing your code

0 commit comments

Comments
 (0)