@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.
Files changed (23) hide show
  1. package/app/api-destined-function/node_modules/.bin/rimraf +4 -4
  2. package/app/api-destined-function/package.json +1 -1
  3. package/dist/src/lib/aws/construct/index.d.ts +1 -0
  4. package/dist/src/lib/aws/construct/index.js +1 -0
  5. package/dist/src/lib/aws/construct/site-with-lambda-backend/constants.d.ts +5 -0
  6. package/dist/src/lib/aws/construct/site-with-lambda-backend/constants.js +9 -0
  7. package/dist/src/lib/aws/construct/site-with-lambda-backend/index.d.ts +3 -0
  8. package/dist/src/lib/aws/construct/site-with-lambda-backend/index.js +19 -0
  9. package/dist/src/lib/aws/construct/site-with-lambda-backend/main.d.ts +116 -0
  10. package/dist/src/lib/aws/construct/site-with-lambda-backend/main.js +317 -0
  11. package/dist/src/lib/aws/construct/site-with-lambda-backend/types.d.ts +45 -0
  12. package/dist/src/lib/aws/construct/site-with-lambda-backend/types.js +2 -0
  13. package/dist/src/lib/aws/services/cloudwatch/main.js +10 -10
  14. package/dist/src/lib/aws/services/lambda/main.d.ts +4 -2
  15. package/dist/src/lib/aws/services/lambda/main.js +9 -1
  16. package/package.json +16 -16
  17. package/src/lib/aws/construct/index.ts +1 -0
  18. package/src/lib/aws/construct/site-with-lambda-backend/constants.ts +6 -0
  19. package/src/lib/aws/construct/site-with-lambda-backend/index.ts +3 -0
  20. package/src/lib/aws/construct/site-with-lambda-backend/main.ts +433 -0
  21. package/src/lib/aws/construct/site-with-lambda-backend/types.ts +64 -0
  22. package/src/lib/aws/services/cloudwatch/main.ts +10 -10
  23. 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: _.map(metricProps, { ..._, distributionId }),
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: _.map(metricProps, { ..._, stateMachineArn }),
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: _.map(metricProps, { ..._, eventBusName, ruleName }),
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: _.map(metricProps, { ..._, apiName }),
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: _.map(metricProps, { ..._, functionName }),
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: _.map(metricProps, { ..._, service }),
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: _.map(metricProps, { ..._, clusterName }),
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: _.map(metricProps, { ..._, clusterName, serviceName }),
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: _.map(metricProps, { ..._, loadBalancer }),
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: _.map(metricProps, { ..._, cacheClusterId }),
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