@gradientedge/cdk-utils 8.125.0 → 8.127.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.
- package/app/api-destined-function/node_modules/.bin/rimraf +4 -4
- package/app/api-destined-function/package.json +1 -1
- package/dist/src/lib/aws/construct/index.d.ts +1 -0
- package/dist/src/lib/aws/construct/index.js +1 -0
- package/dist/src/lib/aws/construct/site-with-lambda-backend/constants.d.ts +5 -0
- package/dist/src/lib/aws/construct/site-with-lambda-backend/constants.js +9 -0
- package/dist/src/lib/aws/construct/site-with-lambda-backend/index.d.ts +3 -0
- package/dist/src/lib/aws/construct/site-with-lambda-backend/index.js +19 -0
- package/dist/src/lib/aws/construct/site-with-lambda-backend/main.d.ts +116 -0
- package/dist/src/lib/aws/construct/site-with-lambda-backend/main.js +317 -0
- package/dist/src/lib/aws/construct/site-with-lambda-backend/types.d.ts +45 -0
- package/dist/src/lib/aws/construct/site-with-lambda-backend/types.js +2 -0
- package/dist/src/lib/aws/services/cloudwatch/main.js +10 -10
- package/dist/src/lib/aws/services/lambda/main.d.ts +4 -2
- package/dist/src/lib/aws/services/lambda/main.js +9 -1
- package/package.json +16 -16
- package/src/lib/aws/construct/index.ts +1 -0
- package/src/lib/aws/construct/site-with-lambda-backend/constants.ts +6 -0
- package/src/lib/aws/construct/site-with-lambda-backend/index.ts +3 -0
- package/src/lib/aws/construct/site-with-lambda-backend/main.ts +433 -0
- package/src/lib/aws/construct/site-with-lambda-backend/types.ts +64 -0
- package/src/lib/aws/services/cloudwatch/main.ts +10 -10
- package/src/lib/aws/services/lambda/main.ts +18 -1
|
@@ -180,7 +180,7 @@ export class CloudWatchManager {
|
|
|
180
180
|
const metricProps: any[] = props.metricProps
|
|
181
181
|
return this.createWidget(id, scope, {
|
|
182
182
|
...props,
|
|
183
|
-
metricProps:
|
|
183
|
+
metricProps: metricProps.map(metricProp => ({ ...metricProp, distributionId })),
|
|
184
184
|
})
|
|
185
185
|
}
|
|
186
186
|
|
|
@@ -196,7 +196,7 @@ export class CloudWatchManager {
|
|
|
196
196
|
const metricProps: any[] = props.metricProps
|
|
197
197
|
return this.createWidget(id, scope, {
|
|
198
198
|
...props,
|
|
199
|
-
metricProps:
|
|
199
|
+
metricProps: metricProps.map(metricProp => ({ ...metricProp, stateMachineArn })),
|
|
200
200
|
})
|
|
201
201
|
}
|
|
202
202
|
|
|
@@ -213,7 +213,7 @@ export class CloudWatchManager {
|
|
|
213
213
|
const metricProps: any[] = props.metricProps
|
|
214
214
|
return this.createWidget(id, scope, {
|
|
215
215
|
...props,
|
|
216
|
-
metricProps:
|
|
216
|
+
metricProps: metricProps.map(metricProp => ({ ...metricProp, eventBusName, ruleName })),
|
|
217
217
|
})
|
|
218
218
|
}
|
|
219
219
|
|
|
@@ -229,7 +229,7 @@ export class CloudWatchManager {
|
|
|
229
229
|
const metricProps: any[] = props.metricProps
|
|
230
230
|
return this.createWidget(id, scope, {
|
|
231
231
|
...props,
|
|
232
|
-
metricProps:
|
|
232
|
+
metricProps: metricProps.map(metricProp => ({ ...metricProp, apiName })),
|
|
233
233
|
})
|
|
234
234
|
}
|
|
235
235
|
|
|
@@ -245,7 +245,7 @@ export class CloudWatchManager {
|
|
|
245
245
|
const metricProps: any[] = props.metricProps
|
|
246
246
|
return this.createWidget(id, scope, {
|
|
247
247
|
...props,
|
|
248
|
-
metricProps:
|
|
248
|
+
metricProps: metricProps.map(metricProp => ({ ...metricProp, functionName })),
|
|
249
249
|
})
|
|
250
250
|
}
|
|
251
251
|
|
|
@@ -261,7 +261,7 @@ export class CloudWatchManager {
|
|
|
261
261
|
const metricProps: any[] = props.metricProps
|
|
262
262
|
return this.createWidget(id, scope, {
|
|
263
263
|
...props,
|
|
264
|
-
metricProps:
|
|
264
|
+
metricProps: metricProps.map(metricProp => ({ ...metricProp, service })),
|
|
265
265
|
})
|
|
266
266
|
}
|
|
267
267
|
|
|
@@ -277,7 +277,7 @@ export class CloudWatchManager {
|
|
|
277
277
|
const metricProps: any[] = props.metricProps
|
|
278
278
|
return this.createWidget(id, scope, {
|
|
279
279
|
...props,
|
|
280
|
-
metricProps:
|
|
280
|
+
metricProps: metricProps.map(metricProp => ({ ...metricProp, clusterName })),
|
|
281
281
|
})
|
|
282
282
|
}
|
|
283
283
|
|
|
@@ -300,7 +300,7 @@ export class CloudWatchManager {
|
|
|
300
300
|
const metricProps: any[] = props.metricProps
|
|
301
301
|
return this.createWidget(id, scope, {
|
|
302
302
|
...props,
|
|
303
|
-
metricProps:
|
|
303
|
+
metricProps: metricProps.map(metricProp => ({ ...metricProp, clusterName, serviceName })),
|
|
304
304
|
})
|
|
305
305
|
}
|
|
306
306
|
|
|
@@ -316,7 +316,7 @@ export class CloudWatchManager {
|
|
|
316
316
|
const metricProps: any[] = props.metricProps
|
|
317
317
|
return this.createWidget(id, scope, {
|
|
318
318
|
...props,
|
|
319
|
-
metricProps:
|
|
319
|
+
metricProps: metricProps.map(metricProp => ({ ...metricProp, loadBalancer })),
|
|
320
320
|
})
|
|
321
321
|
}
|
|
322
322
|
|
|
@@ -332,7 +332,7 @@ export class CloudWatchManager {
|
|
|
332
332
|
const metricProps: any[] = props.metricProps
|
|
333
333
|
return this.createWidget(id, scope, {
|
|
334
334
|
...props,
|
|
335
|
-
metricProps:
|
|
335
|
+
metricProps: metricProps.map(metricProp => ({ ...metricProp, cacheClusterId })),
|
|
336
336
|
})
|
|
337
337
|
}
|
|
338
338
|
|
|
@@ -44,10 +44,12 @@ export class LambdaManager {
|
|
|
44
44
|
* @param id scoped id of the resource
|
|
45
45
|
* @param scope scope in which this resource is defined
|
|
46
46
|
* @param code
|
|
47
|
+
* @param architectures
|
|
47
48
|
*/
|
|
48
|
-
public createLambdaLayer(id: string, scope: CommonConstruct, code: AssetCode) {
|
|
49
|
+
public createLambdaLayer(id: string, scope: CommonConstruct, code: AssetCode, architectures?: Architecture[]) {
|
|
49
50
|
const lambdaLayer = new LayerVersion(scope, `${id}`, {
|
|
50
51
|
code: code,
|
|
52
|
+
compatibleArchitectures: architectures ?? [Architecture.ARM_64],
|
|
51
53
|
compatibleRuntimes: [scope.props.nodejsRuntime ?? CommonStack.NODEJS_RUNTIME],
|
|
52
54
|
description: `${id}`,
|
|
53
55
|
layerVersionName: `${id}-${scope.props.stage}`,
|
|
@@ -58,6 +60,21 @@ export class LambdaManager {
|
|
|
58
60
|
return lambdaLayer
|
|
59
61
|
}
|
|
60
62
|
|
|
63
|
+
public createWebAdapterLayer(id: string, scope: CommonConstruct) {
|
|
64
|
+
return [
|
|
65
|
+
LayerVersion.fromLayerVersionArn(
|
|
66
|
+
scope,
|
|
67
|
+
`${id}-${Architecture.X86_64}`,
|
|
68
|
+
`arn:aws:lambda:${scope.props.region}:753240598075:layer:LambdaAdapterLayerX86:17`
|
|
69
|
+
),
|
|
70
|
+
LayerVersion.fromLayerVersionArn(
|
|
71
|
+
scope,
|
|
72
|
+
`${id}-${Architecture.ARM_64}`,
|
|
73
|
+
`arn:aws:lambda:${scope.props.region}:753240598075:layer:LambdaAdapterLayerArm64:17`
|
|
74
|
+
),
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
|
|
61
78
|
/**
|
|
62
79
|
* @summary Method to create a lambda function (nodejs)
|
|
63
80
|
* @param id scoped id of the resource
|