@bifravst/aws-cdk-lambda-helpers 1.1.2 → 1.2.1
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/LambdaLogGroup.d.ts +6 -0
- package/dist/LambdaLogGroup.js +16 -0
- package/dist/cdk.d.ts +1 -0
- package/dist/cdk.js +1 -0
- package/package.json +2 -1
@@ -0,0 +1,16 @@
|
|
1
|
+
import { Construct } from 'constructs';
|
2
|
+
import { aws_logs as Logs, Names, RemovalPolicy, Stack } from 'aws-cdk-lib';
|
3
|
+
export class LambdaLogGroup extends Construct {
|
4
|
+
logGroup;
|
5
|
+
constructor(parent, id, retention = Logs.RetentionDays.ONE_DAY) {
|
6
|
+
super(parent, id);
|
7
|
+
this.logGroup = new Logs.LogGroup(this, 'logGroup', {
|
8
|
+
retention,
|
9
|
+
logGroupName: `/${Stack.of(this).stackName}/fn/${id}-${Names.uniqueId(this)}`,
|
10
|
+
logGroupClass: Logs.LogGroupClass.STANDARD, // INFREQUENT_ACCESS does not support custom metrics
|
11
|
+
removalPolicy: this.node.getContext('isTest') === true
|
12
|
+
? RemovalPolicy.DESTROY
|
13
|
+
: RemovalPolicy.RETAIN,
|
14
|
+
});
|
15
|
+
}
|
16
|
+
}
|
package/dist/cdk.d.ts
CHANGED
package/dist/cdk.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@bifravst/aws-cdk-lambda-helpers",
|
3
|
-
"version": "1.1
|
3
|
+
"version": "1.2.1",
|
4
4
|
"description": "Helper functions which simplify working with TypeScript lambdas for AWS CDK.",
|
5
5
|
"exports": {
|
6
6
|
".": {
|
@@ -107,6 +107,7 @@
|
|
107
107
|
"dependencies": {
|
108
108
|
"@swc/core": "1.4.12",
|
109
109
|
"glob": "10.3.12",
|
110
|
+
"typescript": "5.4.3",
|
110
111
|
"yazl": "2.5.1"
|
111
112
|
},
|
112
113
|
"peerDependencies": {
|