@xube/kit-aws-data-infrastructure 0.0.83 → 0.0.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/get.js +3 -0
- package/package.json +8 -8
- package/src/api/get.ts +3 -0
package/dist/api/get.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetDataAPI = void 0;
|
|
4
4
|
const kit_aws_data_schema_1 = require("@xube/kit-aws-data-schema");
|
|
5
|
+
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
5
6
|
const aws_apigateway_1 = require("aws-cdk-lib/aws-apigateway");
|
|
6
7
|
const aws_lambda_1 = require("aws-cdk-lib/aws-lambda");
|
|
7
8
|
const aws_lambda_nodejs_1 = require("aws-cdk-lib/aws-lambda-nodejs");
|
|
@@ -18,6 +19,8 @@ class GetDataAPI extends constructs_1.Construct {
|
|
|
18
19
|
environment: {
|
|
19
20
|
[kit_aws_data_schema_1.DATA_TABLE_NAME_ENV_VAR]: props.dataTable.tableName,
|
|
20
21
|
},
|
|
22
|
+
memorySize: 2048,
|
|
23
|
+
timeout: aws_cdk_lib_1.Duration.seconds(300),
|
|
21
24
|
});
|
|
22
25
|
props.dataAPI.root.addMethod(aws_lambda_1.HttpMethod.POST, new aws_apigateway_1.LambdaIntegration(this.getDataFunction));
|
|
23
26
|
props.dataTable.grantReadData(this.getDataFunction);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xube/kit-aws-data-infrastructure",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.85",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
"homepage": "https://github.com/XubeLtd/dev-kit#readme",
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/node": "^20.4.7",
|
|
22
|
-
"@xube/kit-build": "^0.0.
|
|
22
|
+
"@xube/kit-build": "^0.0.85",
|
|
23
23
|
"ts-node": "^10.9.1",
|
|
24
24
|
"typescript": "^5.1.6"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@xube/kit-aws": "^0.0.
|
|
28
|
-
"@xube/kit-aws-data": "^0.0.
|
|
29
|
-
"@xube/kit-aws-data-schema": "^0.0.
|
|
30
|
-
"@xube/kit-aws-infrastructure": "^0.0.
|
|
31
|
-
"@xube/kit-constants": "^0.0.
|
|
32
|
-
"@xube/kit-log": "^0.0.
|
|
27
|
+
"@xube/kit-aws": "^0.0.85",
|
|
28
|
+
"@xube/kit-aws-data": "^0.0.85",
|
|
29
|
+
"@xube/kit-aws-data-schema": "^0.0.85",
|
|
30
|
+
"@xube/kit-aws-infrastructure": "^0.0.85",
|
|
31
|
+
"@xube/kit-constants": "^0.0.85",
|
|
32
|
+
"@xube/kit-log": "^0.0.85",
|
|
33
33
|
"aws-cdk-lib": "^2.100.0",
|
|
34
34
|
"aws-lambda": "^1.0.7",
|
|
35
35
|
"constructs": "^10.3.0",
|
package/src/api/get.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DATA_TABLE_NAME_ENV_VAR } from "@xube/kit-aws-data-schema";
|
|
2
|
+
import { Duration } from "aws-cdk-lib";
|
|
2
3
|
import { IRestApi, LambdaIntegration } from "aws-cdk-lib/aws-apigateway";
|
|
3
4
|
import { ITable } from "aws-cdk-lib/aws-dynamodb";
|
|
4
5
|
import { HttpMethod, Runtime } from "aws-cdk-lib/aws-lambda";
|
|
@@ -25,6 +26,8 @@ export class GetDataAPI extends Construct {
|
|
|
25
26
|
environment: {
|
|
26
27
|
[DATA_TABLE_NAME_ENV_VAR]: props.dataTable.tableName,
|
|
27
28
|
},
|
|
29
|
+
memorySize: 2048,
|
|
30
|
+
timeout: Duration.seconds(300),
|
|
28
31
|
});
|
|
29
32
|
|
|
30
33
|
props.dataAPI.root.addMethod(
|