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
|**Docstring**| We use [TypeDoc](https://typedoc.org) annotations to help generate more readable API references. For public APIs, we always include at least one **Example** to ease everyone's experience when using an IDE. |
129
-
|**Style guide**| We use [Eslint](https://eslint.org) and [Prettier](https://prettier.io)to enforce beyond good practices. We use TypeScript types, function return types, and access modifiers to convey intent. |
129
+
|**Style guide**| We use [Biome](http://biomejs.dev)to enforce style and format beyond good practices. We use TypeScript types, function return types, and access modifiers to convey intent. |
130
130
|**Core utilities**| Core utilities always accept `serviceName` as a constructor parameter, can work in isolation, and are also available in other languages implementation. |
131
131
|**Utilities**| Utilities are not as strict as core and focus on community needs: development productivity, industry leading practices, etc. Both core and general utilities follow our [Tenets](https://docs.powertools.aws.dev/lambda/typescript/#tenets). |
132
132
|**Errors**| Specific errors thrown by Powertools live within utilities themselves and use `Error` suffix e.g. `IdempotencyKeyError`. |
|**Docstring**| We use [TypeDoc](https://typedoc.org){target="_blank"} annotations to help generate more readable API references. For public APIs, we always include at least one **Example** to ease everyone's experience when using an IDE. |
17
-
|**Style guide**| We use [Eslint](https://eslint.org){target="_blank"} and [Prettier](https://prettier.io){target="_blank"} to enforce beyond good practices. We use TypeScript types, function return types, and access modifiers to convey intent. |
17
+
|**Style guide**| We use [Biome](http://biomejs.dev){target="_blank"} for linting and formatting to enforce beyond good practices. We use TypeScript types, function return types, and access modifiers to convey intent. |
18
18
|**Core utilities**| Core utilities always accept `serviceName` as a constructor parameter, can work in isolation, and are also available in other languages implementation. |
19
19
|**Utilities**| Utilities are not as strict as core and focus on community needs: development productivity, industry leading practices, etc. Both core and general utilities follow our [Tenets](https://docs.powertools.aws.dev/lambda/typescript/#tenets){target="_blank"}. |
20
20
|**Errors**| Specific errors thrown by Powertools live within utilities themselves and use `Error` suffix e.g. `IdempotencyKeyError`. |
This feature is currently under development. As such it's considered not stable and we might make significant breaking changes before going [before its release](https://github.com/aws-powertools/powertools-lambda-typescript/milestone/17){target="_blank"}. You are welcome to [provide feedback](https://github.com/aws-powertools/powertools-lambda-typescript/issues/413){target="_blank"} and [contribute to the project](../../contributing/getting_started.md){target="_blank"}.
9
+
10
+
Event handler for Amazon API Gateway REST and HTTP APIs, Application Loader Balancer (ALB), Lambda Function URLs, and VPC Lattice.
11
+
12
+
## Key Features
13
+
14
+
* Lightweight routing to reduce boilerplate for API Gateway REST/HTTP API, ALB and Lambda Function URLs.
15
+
* Support for CORS, binary and Gzip compression, Decimals JSON encoding and bring your own JSON serializer
16
+
* Built-in integration with [Parser](../../utilities/parser.md){target="_blank"} for easy payload validation and parsing
17
+
* Works with micro function (one or a few routes) and monolithic functions (all routes)
18
+
19
+
## Getting started
20
+
21
+
???+ tip
22
+
All examples shared in this documentation are available within the [project repository](https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/examples/snippets/event-handler){target="_blank"}.
23
+
24
+
### Install
25
+
26
+
```shell
27
+
npm install @aws-lambda-powertools/event-handler
28
+
```
29
+
30
+
### Required resources
31
+
32
+
If you're using any API Gateway integration, you must have an existing [API Gateway Proxy integration](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html){target="_blank"} or [ALB](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html){target="_blank"} configured to invoke your Lambda function.
33
+
34
+
In case of using [VPC Lattice](https://docs.aws.amazon.com/lambda/latest/dg/services-vpc-lattice.html){target="_blank"}, you must have a service network configured to invoke your Lambda function.
35
+
36
+
This is the sample infrastructure for API Gateway and Lambda Function URLs we are using for the examples in this documentation.
37
+
38
+
???+ info "There is no additional permissions or dependencies required to use this utility."
39
+
40
+
=== "API Gateway SAM Template"
41
+
42
+
```yaml title="AWS Serverless Application Model (SAM) example"
0 commit comments