@digitraffic/common 2026.8.31-2 → 2026.9.4-2
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 type { Stack } from "aws-cdk-lib";
|
|
1
|
+
import type { Size, Stack } from "aws-cdk-lib";
|
|
2
2
|
import { Duration } from "aws-cdk-lib";
|
|
3
3
|
import type { ISecurityGroup } from "aws-cdk-lib/aws-ec2";
|
|
4
4
|
import type { IRole } from "aws-cdk-lib/aws-iam";
|
|
@@ -21,6 +21,7 @@ export declare class FunctionBuilder {
|
|
|
21
21
|
private functionName;
|
|
22
22
|
private environment;
|
|
23
23
|
private vpc?;
|
|
24
|
+
private storageSize?;
|
|
24
25
|
private alarms;
|
|
25
26
|
private code;
|
|
26
27
|
private handler;
|
|
@@ -82,6 +83,10 @@ export declare class FunctionBuilder {
|
|
|
82
83
|
* Set runtime for the lambda. Default is Runtime.NODEJS_24_X.
|
|
83
84
|
*/
|
|
84
85
|
withRuntime(runtime: Runtime): this;
|
|
86
|
+
/**
|
|
87
|
+
* Set storage size for the lambda. Defaults to AWS default (512MB).
|
|
88
|
+
*/
|
|
89
|
+
withStorageSize(storageSize: Size): this;
|
|
85
90
|
/**
|
|
86
91
|
* Add Lambda layers.
|
|
87
92
|
*/
|
|
@@ -21,6 +21,7 @@ export class FunctionBuilder {
|
|
|
21
21
|
functionName;
|
|
22
22
|
environment = {};
|
|
23
23
|
vpc;
|
|
24
|
+
storageSize;
|
|
24
25
|
alarms = new DtFunctionAlarms();
|
|
25
26
|
// these will be overridden in constructor, but inspection won't see it, so set some default values.
|
|
26
27
|
code = Code.fromInline("placeholder");
|
|
@@ -128,6 +129,13 @@ export class FunctionBuilder {
|
|
|
128
129
|
this.runtime = runtime;
|
|
129
130
|
return this;
|
|
130
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Set storage size for the lambda. Defaults to AWS default (512MB).
|
|
134
|
+
*/
|
|
135
|
+
withStorageSize(storageSize) {
|
|
136
|
+
this.storageSize = storageSize;
|
|
137
|
+
return this;
|
|
138
|
+
}
|
|
131
139
|
/**
|
|
132
140
|
* Add Lambda layers.
|
|
133
141
|
*/
|
|
@@ -233,6 +241,7 @@ export class FunctionBuilder {
|
|
|
233
241
|
environment: this.getEnvironment(),
|
|
234
242
|
description: this.description,
|
|
235
243
|
layers: this.layers.length > 0 ? this.layers : undefined,
|
|
244
|
+
ephemeralStorageSize: this.storageSize,
|
|
236
245
|
});
|
|
237
246
|
if (this._features.secretAccess) {
|
|
238
247
|
this._stack.grantSecret(createdFunction);
|
|
@@ -52,7 +52,7 @@ export class DigitrafficStack extends Stack {
|
|
|
52
52
|
[EnvKeys.APP_NAME]: `${this.configuration.trafficType.toLowerCase()}-${kebabCase(this.configuration.shortName)}`,
|
|
53
53
|
DB_APPLICATION: dbApplication,
|
|
54
54
|
...(this.configuration.secretId
|
|
55
|
-
? { SECRET_ID: this.configuration.secretId }
|
|
55
|
+
? { [EnvKeys.SECRET_ID]: this.configuration.secretId }
|
|
56
56
|
: {}),
|
|
57
57
|
};
|
|
58
58
|
}
|