@bifravst/aws-cdk-lambda-helpers 1.7.46 → 1.8.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.
@@ -1,4 +1,4 @@
|
|
1
|
-
import { aws_lambda as Lambda } from 'aws-cdk-lib';
|
1
|
+
import { aws_lambda as Lambda, type aws_logs as Logs } from 'aws-cdk-lib';
|
2
2
|
import { Construct } from 'constructs';
|
3
3
|
import type { PackedLambda } from './packLambda.js';
|
4
4
|
/**
|
@@ -19,5 +19,6 @@ import type { PackedLambda } from './packLambda.js';
|
|
19
19
|
*/
|
20
20
|
export declare class PackedLambdaFn extends Construct {
|
21
21
|
readonly fn: Lambda.Function;
|
22
|
+
readonly logGroup: Logs.ILogGroup;
|
22
23
|
constructor(parent: Construct, id: string, source: PackedLambda, props: Partial<Omit<Lambda.FunctionProps, 'code' | 'handler'>>);
|
23
24
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { aws_lambda as Lambda, Duration, Stack } from 'aws-cdk-lib';
|
1
|
+
import { aws_lambda as Lambda, Duration, Stack, } from 'aws-cdk-lib';
|
2
2
|
import { Construct } from 'constructs';
|
3
3
|
import { LambdaLogGroup } from './LambdaLogGroup.js';
|
4
4
|
import { Permissions as SettingsPermissions } from '@bifravst/aws-ssm-settings-helpers/cdk';
|
@@ -21,9 +21,11 @@ import { LambdaSource } from './LambdaSource.js';
|
|
21
21
|
*/
|
22
22
|
export class PackedLambdaFn extends Construct {
|
23
23
|
fn;
|
24
|
+
logGroup;
|
24
25
|
constructor(parent, id, source, props) {
|
25
26
|
super(parent, id);
|
26
27
|
const { environment, initialPolicy, ...rest } = props;
|
28
|
+
this.logGroup = new LambdaLogGroup(this, 'fnLogs').logGroup;
|
27
29
|
this.fn = new Lambda.Function(this, 'fn', {
|
28
30
|
architecture: Lambda.Architecture.ARM_64,
|
29
31
|
runtime: props.runtime ?? Lambda.Runtime.NODEJS_20_X,
|
@@ -40,8 +42,8 @@ export class PackedLambdaFn extends Construct {
|
|
40
42
|
...(initialPolicy ?? []),
|
41
43
|
SettingsPermissions(Stack.of(this)),
|
42
44
|
],
|
43
|
-
...new LambdaLogGroup(this, 'fnLogs'),
|
44
45
|
...rest,
|
46
|
+
logGroup: this.logGroup,
|
45
47
|
handler: source.handler,
|
46
48
|
code: new LambdaSource(this, source).code,
|
47
49
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@bifravst/aws-cdk-lambda-helpers",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.8.0",
|
4
4
|
"description": "Helper functions which simplify working with TypeScript lambdas for AWS CDK.",
|
5
5
|
"exports": {
|
6
6
|
".": {
|
@@ -64,7 +64,7 @@
|
|
64
64
|
"commitlint": "19.3.0",
|
65
65
|
"husky": "9.0.11",
|
66
66
|
"id128": "1.6.6",
|
67
|
-
"tsx": "4.
|
67
|
+
"tsx": "4.15.1"
|
68
68
|
},
|
69
69
|
"lint-staged": {
|
70
70
|
"*.ts": [
|
@@ -107,7 +107,7 @@
|
|
107
107
|
],
|
108
108
|
"prettier": "@bifravst/prettier-config",
|
109
109
|
"dependencies": {
|
110
|
-
"@swc/core": "1.5.
|
110
|
+
"@swc/core": "1.5.27",
|
111
111
|
"glob": "10.4.1",
|
112
112
|
"typescript": "5.4.5",
|
113
113
|
"yazl": "2.5.1"
|