@ttoss/lambda-postgres-query 0.6.2 → 1.1.0

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.
@@ -3,268 +3,327 @@ import { __name } from "../chunk-V4MHYKRI.js";
3
3
 
4
4
  // src/cloudformation/createLambdaPostgresQueryTemplate.ts
5
5
  var HANDLER_DEFAULT = "handler.handler";
6
- var HANDLER_READ_ONLY_DEFAULT = "handler.readOnlyHandler";
6
+ var LAMBDA_POSTGRES_QUERY_FUNCTION_DEFAULT_NAME = "LambdaPostgresQueryFunction";
7
7
  var MEMORY_SIZE_DEFAULT = 128;
8
8
  var TIMEOUT_DEFAULT = 30;
9
- var createLambdaPostgresQueryTemplate = /* @__PURE__ */__name(({
10
- handler: handler2 = HANDLER_DEFAULT,
11
- readOnlyHandler: readOnlyHandler2 = HANDLER_READ_ONLY_DEFAULT,
12
- memorySize = 128,
13
- timeout = 30
14
- } = {}) => {
9
+ var DATABASE_PARAMETERS_DEFAULT = {
10
+ host: "DatabaseHost",
11
+ name: "DatabaseName",
12
+ username: "DatabaseUsername",
13
+ password: "DatabasePassword",
14
+ port: "DatabasePort"
15
+ };
16
+ var createParameter = /* @__PURE__ */__name(({
17
+ description,
18
+ noEcho,
19
+ defaultValue
20
+ }) => {
15
21
  return {
16
- AWSTemplateFormatVersion: "2010-09-09",
17
- Description: "A Lambda function to query PostgreSQL.",
18
- Parameters: {
19
- DatabaseHost: {
20
- Type: "String",
21
- Description: "Database host."
22
- },
23
- DatabaseHostReadOnly: {
24
- Type: "String",
25
- Description: "Database host read only."
26
- },
27
- DatabaseName: {
28
- Type: "String",
29
- Description: "Database name."
30
- },
31
- DatabaseUsername: {
32
- Type: "String",
33
- Description: "Database username."
34
- },
35
- DatabasePassword: {
36
- Type: "String",
37
- Description: "Database password.",
38
- NoEcho: true
39
- },
40
- DatabasePort: {
41
- Type: "String",
42
- Default: "5432",
43
- Description: "Database port."
44
- },
45
- DatabaseNameReadOnly: {
46
- Type: "String",
47
- Description: "Database name for read-only access."
48
- },
49
- DatabaseUsernameReadOnly: {
50
- Type: "String",
51
- Description: "Database username for read-only access."
52
- },
53
- DatabasePasswordReadOnly: {
54
- Type: "String",
55
- Description: "Database password for read-only access.",
56
- NoEcho: true
57
- },
58
- DatabasePortReadOnly: {
59
- Type: "String",
60
- Default: "5432",
61
- Description: "Database port for read-only access."
62
- },
63
- LambdaS3Bucket: {
64
- Type: "String",
65
- Description: "The S3 bucket where the Lambda code is stored."
66
- },
67
- LambdaS3Key: {
68
- Type: "String",
69
- Description: "The S3 key where the Lambda code is stored."
70
- },
71
- LambdaS3ObjectVersion: {
72
- Type: "String",
73
- Description: "The S3 object version of the Lambda code."
74
- },
75
- SecurityGroupIds: {
76
- Description: "Security Group IDs",
77
- Type: "List<AWS::EC2::SecurityGroup::Id>"
78
- },
79
- SubnetIds: {
80
- Description: "Subnet IDs",
81
- Type: "List<AWS::EC2::Subnet::Id>"
82
- }
83
- },
84
- Resources: {
85
- LambdaQueryExecutionRole: {
86
- Type: "AWS::IAM::Role",
87
- Properties: {
88
- AssumeRolePolicyDocument: {
89
- Version: "2012-10-17",
90
- Statement: [{
91
- Effect: "Allow",
92
- Principal: {
93
- Service: "lambda.amazonaws.com"
94
- },
95
- Action: "sts:AssumeRole"
96
- }]
97
- },
98
- ManagedPolicyArns: ["arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole"]
99
- }
100
- },
101
- LambdaQueryFunction: {
102
- Type: "AWS::Lambda::Function",
103
- Properties: {
104
- Code: {
105
- S3Bucket: {
106
- Ref: "LambdaS3Bucket"
107
- },
108
- S3Key: {
109
- Ref: "LambdaS3Key"
110
- },
111
- S3ObjectVersion: {
112
- Ref: "LambdaS3ObjectVersion"
113
- }
114
- },
115
- MemorySize: memorySize,
116
- Timeout: timeout,
117
- Handler: handler2,
118
- Role: {
119
- "Fn::GetAtt": ["LambdaQueryExecutionRole", "Arn"]
22
+ Type: "String",
23
+ Description: description,
24
+ ...(noEcho ? {
25
+ NoEcho: true
26
+ } : {}),
27
+ ...(defaultValue ? {
28
+ Default: defaultValue
29
+ } : {})
30
+ };
31
+ }, "createParameter");
32
+ var createDefaultFunction = /* @__PURE__ */__name(() => {
33
+ return {
34
+ name: LAMBDA_POSTGRES_QUERY_FUNCTION_DEFAULT_NAME,
35
+ handler: HANDLER_DEFAULT,
36
+ databaseParameters: DATABASE_PARAMETERS_DEFAULT,
37
+ outputArnName: "LambdaPostgresQueryFunctionArn"
38
+ };
39
+ }, "createDefaultFunction");
40
+ var resolveFunctionName = /* @__PURE__ */__name(({
41
+ name,
42
+ logicalId
43
+ }) => {
44
+ const functionName = name || logicalId;
45
+ return functionName || LAMBDA_POSTGRES_QUERY_FUNCTION_DEFAULT_NAME;
46
+ }, "resolveFunctionName");
47
+ var normalizeFunctions = /* @__PURE__ */__name(({
48
+ functions
49
+ }) => {
50
+ if (!functions?.length) {
51
+ return [createDefaultFunction()];
52
+ }
53
+ return functions.map(lambdaFunction => {
54
+ const functionName = resolveFunctionName({
55
+ name: lambdaFunction.name,
56
+ logicalId: lambdaFunction.logicalId
57
+ });
58
+ return {
59
+ name: functionName,
60
+ handler: lambdaFunction.handler || HANDLER_DEFAULT,
61
+ outputArnName: lambdaFunction.outputArnName || `${functionName}Arn`,
62
+ databaseParameters: lambdaFunction.databaseParameters || DATABASE_PARAMETERS_DEFAULT
63
+ };
64
+ });
65
+ }, "normalizeFunctions");
66
+ var createDatabaseParametersForFunction = /* @__PURE__ */__name(({
67
+ databaseParameters,
68
+ functionName,
69
+ allParameters
70
+ }) => {
71
+ return {
72
+ [databaseParameters.host]: allParameters[databaseParameters.host] || createParameter({
73
+ description: `Database host for ${functionName}.`
74
+ }),
75
+ [databaseParameters.name]: allParameters[databaseParameters.name] || createParameter({
76
+ description: `Database name for ${functionName}.`
77
+ }),
78
+ [databaseParameters.username]: allParameters[databaseParameters.username] || createParameter({
79
+ description: `Database username for ${functionName}.`
80
+ }),
81
+ [databaseParameters.password]: allParameters[databaseParameters.password] || createParameter({
82
+ description: `Database password for ${functionName}.`,
83
+ noEcho: true
84
+ }),
85
+ [databaseParameters.port]: allParameters[databaseParameters.port] || createParameter({
86
+ description: `Database port for ${functionName}.`,
87
+ defaultValue: "5432"
88
+ })
89
+ };
90
+ }, "createDatabaseParametersForFunction");
91
+ var createCredentialsParameters = /* @__PURE__ */__name(({
92
+ functions
93
+ }) => {
94
+ return functions.reduce((allParameters, lambdaFunction) => {
95
+ return {
96
+ ...allParameters,
97
+ ...createDatabaseParametersForFunction({
98
+ databaseParameters: lambdaFunction.databaseParameters,
99
+ functionName: lambdaFunction.name,
100
+ allParameters
101
+ })
102
+ };
103
+ }, {});
104
+ }, "createCredentialsParameters");
105
+ var createLambdaResource = /* @__PURE__ */__name(({
106
+ functionName,
107
+ handler: handler2,
108
+ databaseParameters,
109
+ memorySize,
110
+ timeout,
111
+ deletionProtection
112
+ }) => {
113
+ const resourcePolicies = deletionProtection ? {
114
+ DeletionPolicy: "Retain",
115
+ UpdateReplacePolicy: "Retain"
116
+ } : {};
117
+ return {
118
+ [functionName]: {
119
+ Type: "AWS::Lambda::Function",
120
+ ...resourcePolicies,
121
+ Properties: {
122
+ Code: {
123
+ S3Bucket: {
124
+ Ref: "LambdaS3Bucket"
120
125
  },
121
- Runtime: "nodejs24.x",
122
- Environment: {
123
- Variables: {
124
- DATABASE_HOST: {
125
- Ref: "DatabaseHost"
126
- },
127
- DATABASE_NAME: {
128
- Ref: "DatabaseName"
129
- },
130
- DATABASE_USERNAME: {
131
- Ref: "DatabaseUsername"
132
- },
133
- DATABASE_PASSWORD: {
134
- Ref: "DatabasePassword"
135
- },
136
- DATABASE_PORT: {
137
- Ref: "DatabasePort"
138
- }
139
- }
126
+ S3Key: {
127
+ Ref: "LambdaS3Key"
140
128
  },
141
- VpcConfig: {
142
- SecurityGroupIds: {
143
- Ref: "SecurityGroupIds"
144
- },
145
- SubnetIds: {
146
- Ref: "SubnetIds"
147
- }
129
+ S3ObjectVersion: {
130
+ Ref: "LambdaS3ObjectVersion"
148
131
  }
149
- }
150
- },
151
- LambdaQueryFunctionLogs: {
152
- Type: "AWS::Logs::LogGroup",
153
- DependsOn: "LambdaQueryFunction",
154
- Properties: {
155
- LogGroupName: {
156
- "Fn::Join": ["", ["/aws/lambda/", {
157
- Ref: "LambdaQueryFunction"
158
- }]]
159
- },
160
- RetentionInDays: 3
161
- }
162
- },
163
- LambdaReadOnlyQueryFunction: {
164
- Type: "AWS::Lambda::Function",
165
- Properties: {
166
- Code: {
167
- S3Bucket: {
168
- Ref: "LambdaS3Bucket"
132
+ },
133
+ MemorySize: memorySize,
134
+ Timeout: timeout,
135
+ Handler: handler2,
136
+ Role: {
137
+ "Fn::GetAtt": ["LambdaQueryExecutionRole", "Arn"]
138
+ },
139
+ Runtime: "nodejs24.x",
140
+ Environment: {
141
+ Variables: {
142
+ DATABASE_HOST: {
143
+ Ref: databaseParameters.host
169
144
  },
170
- S3Key: {
171
- Ref: "LambdaS3Key"
145
+ DATABASE_NAME: {
146
+ Ref: databaseParameters.name
172
147
  },
173
- S3ObjectVersion: {
174
- Ref: "LambdaS3ObjectVersion"
175
- }
176
- },
177
- MemorySize: memorySize,
178
- Timeout: timeout,
179
- Handler: readOnlyHandler2,
180
- Role: {
181
- "Fn::GetAtt": ["LambdaQueryExecutionRole", "Arn"]
182
- },
183
- Runtime: "nodejs24.x",
184
- Environment: {
185
- Variables: {
186
- DATABASE_HOST: {
187
- Ref: "DatabaseHost"
188
- },
189
- DATABASE_NAME: {
190
- Ref: "DatabaseName"
191
- },
192
- DATABASE_USERNAME: {
193
- Ref: "DatabaseUsername"
194
- },
195
- DATABASE_PASSWORD: {
196
- Ref: "DatabasePassword"
197
- },
198
- DATABASE_PORT: {
199
- Ref: "DatabasePort"
200
- },
201
- DATABASE_HOST_READ_ONLY: {
202
- Ref: "DatabaseHostReadOnly"
203
- },
204
- DATABASE_NAME_READ_ONLY: {
205
- Ref: "DatabaseNameReadOnly"
206
- },
207
- DATABASE_USERNAME_READ_ONLY: {
208
- Ref: "DatabaseUsernameReadOnly"
209
- },
210
- DATABASE_PASSWORD_READ_ONLY: {
211
- Ref: "DatabasePasswordReadOnly"
212
- },
213
- DATABASE_PORT_READ_ONLY: {
214
- Ref: "DatabasePortReadOnly"
215
- }
216
- }
217
- },
218
- VpcConfig: {
219
- SecurityGroupIds: {
220
- Ref: "SecurityGroupIds"
148
+ DATABASE_USERNAME: {
149
+ Ref: databaseParameters.username
221
150
  },
222
- SubnetIds: {
223
- Ref: "SubnetIds"
151
+ DATABASE_PASSWORD: {
152
+ Ref: databaseParameters.password
153
+ },
154
+ DATABASE_PORT: {
155
+ Ref: databaseParameters.port
224
156
  }
225
157
  }
226
- }
227
- },
228
- LambdaReadOnlyQueryFunctionLogs: {
229
- Type: "AWS::Logs::LogGroup",
230
- DependsOn: "LambdaReadOnlyQueryFunction",
231
- Properties: {
232
- LogGroupName: {
233
- "Fn::Join": ["", ["/aws/lambda/", {
234
- Ref: "LambdaReadOnlyQueryFunction"
235
- }]]
158
+ },
159
+ VpcConfig: {
160
+ SecurityGroupIds: {
161
+ Ref: "SecurityGroupIds"
236
162
  },
237
- RetentionInDays: 3
163
+ SubnetIds: {
164
+ Ref: "SubnetIds"
165
+ }
238
166
  }
239
167
  }
240
- },
241
- Outputs: {
242
- LambdaPostgresQueryFunction: {
243
- Description: "Lambda function to query PostgreSQL.",
244
- Value: {
245
- Ref: "LambdaQueryFunction"
246
- }
247
- },
248
- LambdaPostgresQueryFunctionArn: {
249
- Description: "Lambda function to query PostgreSQL ARN.",
250
- Value: {
251
- "Fn::GetAtt": ["LambdaQueryFunction", "Arn"]
252
- }
253
- },
254
- LambdaPostgresReadOnlyQueryFunction: {
255
- Description: "Lambda function to query PostgreSQL (read-only).",
168
+ }
169
+ };
170
+ }, "createLambdaResource");
171
+ var createLambdaLogResource = /* @__PURE__ */__name(({
172
+ logicalId
173
+ }) => {
174
+ return {
175
+ [`${logicalId}Logs`]: {
176
+ Type: "AWS::Logs::LogGroup",
177
+ DependsOn: logicalId,
178
+ Properties: {
179
+ LogGroupName: {
180
+ "Fn::Join": ["", ["/aws/lambda/", {
181
+ Ref: logicalId
182
+ }]]
183
+ },
184
+ RetentionInDays: 3
185
+ }
186
+ }
187
+ };
188
+ }, "createLambdaLogResource");
189
+ var createResources = /* @__PURE__ */__name(({
190
+ functions,
191
+ memorySize,
192
+ timeout,
193
+ deletionProtection
194
+ }) => {
195
+ return functions.reduce((allResources, lambdaFunction) => {
196
+ const {
197
+ name,
198
+ handler: handler2,
199
+ databaseParameters
200
+ } = lambdaFunction;
201
+ return {
202
+ ...allResources,
203
+ ...createLambdaResource({
204
+ functionName: name,
205
+ handler: handler2,
206
+ databaseParameters,
207
+ memorySize,
208
+ timeout,
209
+ deletionProtection
210
+ }),
211
+ ...createLambdaLogResource({
212
+ logicalId: name
213
+ })
214
+ };
215
+ }, {});
216
+ }, "createResources");
217
+ var createOutputs = /* @__PURE__ */__name(({
218
+ functions
219
+ }) => {
220
+ return functions.reduce((allOutputs, lambdaFunction) => {
221
+ const {
222
+ name,
223
+ outputArnName
224
+ } = lambdaFunction;
225
+ return {
226
+ ...allOutputs,
227
+ [name]: {
228
+ Description: `Lambda function to query PostgreSQL (${name}).`,
256
229
  Value: {
257
- Ref: "LambdaReadOnlyQueryFunction"
230
+ Ref: name
258
231
  }
259
232
  },
260
- LambdaPostgresReadOnlyQueryFunctionArn: {
261
- Description: "Lambda function to query PostgreSQL (read-only) ARN.",
233
+ [outputArnName]: {
234
+ Description: `Lambda function to query PostgreSQL (${name}) ARN.`,
262
235
  Value: {
263
- "Fn::GetAtt": ["LambdaReadOnlyQueryFunction", "Arn"]
236
+ "Fn::GetAtt": [name, "Arn"]
237
+ },
238
+ Export: {
239
+ Name: {
240
+ "Fn::Sub": `\${AWS::StackName}-${outputArnName}`
241
+ }
264
242
  }
265
243
  }
244
+ };
245
+ }, {});
246
+ }, "createOutputs");
247
+ var createTemplateParameters = /* @__PURE__ */__name(({
248
+ credentialsParameters
249
+ }) => {
250
+ return {
251
+ ...credentialsParameters,
252
+ LambdaS3Bucket: {
253
+ Type: "String",
254
+ Description: "The S3 bucket where the Lambda code is stored."
255
+ },
256
+ LambdaS3Key: {
257
+ Type: "String",
258
+ Description: "The S3 key where the Lambda code is stored."
259
+ },
260
+ LambdaS3ObjectVersion: {
261
+ Type: "String",
262
+ Description: "The S3 object version of the Lambda code."
263
+ },
264
+ SecurityGroupIds: {
265
+ Description: "Security Group IDs",
266
+ Type: "List<AWS::EC2::SecurityGroup::Id>"
267
+ },
268
+ SubnetIds: {
269
+ Description: "Subnet IDs",
270
+ Type: "List<AWS::EC2::Subnet::Id>"
266
271
  }
267
272
  };
273
+ }, "createTemplateParameters");
274
+ var createExecutionRoleResource = /* @__PURE__ */__name(() => {
275
+ return {
276
+ LambdaQueryExecutionRole: {
277
+ Type: "AWS::IAM::Role",
278
+ Properties: {
279
+ AssumeRolePolicyDocument: {
280
+ Version: "2012-10-17",
281
+ Statement: [{
282
+ Effect: "Allow",
283
+ Principal: {
284
+ Service: "lambda.amazonaws.com"
285
+ },
286
+ Action: "sts:AssumeRole"
287
+ }]
288
+ },
289
+ ManagedPolicyArns: ["arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole"]
290
+ }
291
+ }
292
+ };
293
+ }, "createExecutionRoleResource");
294
+ var createLambdaPostgresQueryTemplate = /* @__PURE__ */__name(({
295
+ functions,
296
+ memorySize = MEMORY_SIZE_DEFAULT,
297
+ timeout = TIMEOUT_DEFAULT,
298
+ deletionProtection = false
299
+ } = {}) => {
300
+ const templateFunctions = normalizeFunctions({
301
+ functions
302
+ });
303
+ const credentialsParameters = createCredentialsParameters({
304
+ functions: templateFunctions
305
+ });
306
+ const templateResources = createResources({
307
+ functions: templateFunctions,
308
+ memorySize,
309
+ timeout,
310
+ deletionProtection
311
+ });
312
+ const templateOutputs = createOutputs({
313
+ functions: templateFunctions
314
+ });
315
+ return {
316
+ AWSTemplateFormatVersion: "2010-09-09",
317
+ Description: "A Lambda function to query PostgreSQL.",
318
+ Parameters: createTemplateParameters({
319
+ credentialsParameters
320
+ }),
321
+ Resources: {
322
+ ...createExecutionRoleResource(),
323
+ ...templateResources
324
+ },
325
+ Outputs: templateOutputs
326
+ };
268
327
  }, "createLambdaPostgresQueryTemplate");
269
328
 
270
329
  // src/cloudformation/lambdaQueryHandler.ts
@@ -298,62 +357,4 @@ var handler = /* @__PURE__ */__name(async event => {
298
357
  throw error;
299
358
  }
300
359
  }, "handler");
301
-
302
- // src/cloudformation/lambdaReadOnlyQueryHandler.ts
303
- import { Client as Client2 } from "pg";
304
- var databaseReadOnly = process.env.DATABASE_NAME_READ_ONLY;
305
- var usernameReadOnly = process.env.DATABASE_USERNAME_READ_ONLY;
306
- var passwordReadOnly = process.env.DATABASE_PASSWORD_READ_ONLY;
307
- var hostReadOnly = process.env.DATABASE_HOST_READ_ONLY;
308
- var portReadOnly = process.env.DATABASE_PORT_READ_ONLY;
309
- var getConnectionConfig = /* @__PURE__ */__name(() => {
310
- return {
311
- database: databaseReadOnly || process.env.DATABASE_NAME,
312
- username: usernameReadOnly || process.env.DATABASE_USERNAME,
313
- password: passwordReadOnly || process.env.DATABASE_PASSWORD,
314
- host: hostReadOnly || process.env.DATABASE_HOST,
315
- port: portReadOnly || process.env.DATABASE_PORT
316
- };
317
- }, "getConnectionConfig");
318
- var readOnlyHandler = /* @__PURE__ */__name(async event => {
319
- if (!databaseReadOnly && !usernameReadOnly && !passwordReadOnly && !hostReadOnly && !portReadOnly) {
320
- throw new Error("At least one read-only override must be defined (DATABASE_NAME_READ_ONLY, DATABASE_USERNAME_READ_ONLY, DATABASE_PASSWORD_READ_ONLY, DATABASE_HOST_READ_ONLY, DATABASE_PORT_READ_ONLY). Unset overrides fall back to the corresponding non-read-only env vars.");
321
- }
322
- const {
323
- database: database2,
324
- username: username2,
325
- password: password2,
326
- host: host2,
327
- port: port2
328
- } = getConnectionConfig();
329
- try {
330
- const client = new Client2({
331
- database: database2,
332
- user: username2,
333
- password: password2,
334
- host: host2,
335
- port: Number(port2)
336
- });
337
- await client.connect();
338
- try {
339
- await client.query("BEGIN READ ONLY");
340
- try {
341
- const res = await client.query(event);
342
- await client.query("COMMIT");
343
- return res;
344
- } catch (queryError) {
345
- await client.query("ROLLBACK");
346
- throw queryError;
347
- }
348
- } finally {
349
- await client.end();
350
- }
351
- } catch (error) {
352
- console.error("Error running read-only query", {
353
- error,
354
- event
355
- });
356
- throw error;
357
- }
358
- }, "readOnlyHandler");
359
- export { HANDLER_DEFAULT, HANDLER_READ_ONLY_DEFAULT, MEMORY_SIZE_DEFAULT, TIMEOUT_DEFAULT, createLambdaPostgresQueryTemplate, handler, readOnlyHandler };
360
+ export { DATABASE_PARAMETERS_DEFAULT, HANDLER_DEFAULT, LAMBDA_POSTGRES_QUERY_FUNCTION_DEFAULT_NAME, MEMORY_SIZE_DEFAULT, TIMEOUT_DEFAULT, createLambdaPostgresQueryTemplate, handler };
package/dist/esm/index.js CHANGED
@@ -9,14 +9,14 @@ var textDecoder = new TextDecoder("utf-8");
9
9
  var query = /* @__PURE__ */__name(async params => {
10
10
  try {
11
11
  const {
12
- lambdaPostgresQueryFunction = process.env.LAMBDA_POSTGRES_QUERY_FUNCTION,
12
+ functionName,
13
13
  camelCaseKeys = true,
14
14
  ...pgParams
15
15
  } = typeof params === "string" ? {
16
16
  text: params
17
17
  } : params;
18
18
  const input = {
19
- FunctionName: lambdaPostgresQueryFunction,
19
+ FunctionName: functionName || process.env.LAMBDA_POSTGRES_QUERY_FUNCTION_NAME,
20
20
  Payload: JSON.stringify({
21
21
  ...pgParams
22
22
  })
package/dist/index.d.cts CHANGED
@@ -2,7 +2,7 @@ import * as pg from 'pg';
2
2
  import { QueryConfig, QueryResultRow } from 'pg';
3
3
 
4
4
  type QueryParams = {
5
- lambdaPostgresQueryFunction?: string;
5
+ functionName?: string;
6
6
  camelCaseKeys?: boolean;
7
7
  } & QueryConfig;
8
8
  type LambdaError = {
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as pg from 'pg';
2
2
  import { QueryConfig, QueryResultRow } from 'pg';
3
3
 
4
4
  type QueryParams = {
5
- lambdaPostgresQueryFunction?: string;
5
+ functionName?: string;
6
6
  camelCaseKeys?: boolean;
7
7
  } & QueryConfig;
8
8
  type LambdaError = {