Commit ef31a15
authored
Fix: Updating aws-ts-apigateway-lambda-serverless for TS2339, fixes 2159 (#2164)
This pull request includes several changes to improve the AWS API
Gateway and Lambda serverless setup. The most important changes involve
importing additional modules, modifying the handler function to include
context, and creating separate Lambda functions for each HTTP method.
### Improvements to Lambda handler:
*
[`aws-ts-apigateway-lambda-serverless/handler.ts`](diffhunk://#diff-0a564020005e94424a9318c3ad252cb4119c4304b15ebe92e953385768f0b355L4-R17):
Modified the handler function to include the `Context` parameter and
updated the function signature to use `APIGatewayProxyEvent` and
`APIGatewayProxyResult` types.
### Enhancements to API Gateway setup:
*
[`aws-ts-apigateway-lambda-serverless/index.ts`](diffhunk://#diff-cbf043ee80f083bc116640a425c2f7c19700de323da4fef1d55d0a8faf851bc7L3-R60):
Replaced the use of `awsx.apigateway.API` with `apigateway.RestAPI`, and
created separate Lambda functions for GET, POST, and DELETE methods
using `aws.lambda.CallbackFunction`.
### Dependency updates:
*
[`aws-ts-apigateway-lambda-serverless/package.json`](diffhunk://#diff-4c66d2c846846f26db19087ce1526a6ed4a1ba78ed5947f6e7e47187496e39a4R9):
Added `@pulumi/aws-apigateway` as a new dependency.
This fixes #21591 parent 9a35f2d commit ef31a15
File tree
3 files changed
+49
-20
lines changed- aws-ts-apigateway-lambda-serverless
3 files changed
+49
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | | - | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | | - | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
10 | 42 | | |
11 | | - | |
| 43 | + | |
12 | 44 | | |
13 | 45 | | |
14 | 46 | | |
15 | 47 | | |
16 | | - | |
17 | | - | |
| 48 | + | |
| 49 | + | |
18 | 50 | | |
19 | 51 | | |
20 | 52 | | |
21 | 53 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 54 | + | |
27 | 55 | | |
28 | 56 | | |
29 | 57 | | |
30 | 58 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 59 | + | |
36 | 60 | | |
37 | 61 | | |
38 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
0 commit comments