@gradientedge/cdk-utils 8.91.0 → 8.92.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 (223) hide show
  1. package/.eslintrc.json +40 -0
  2. package/app/api-destined-function/src/lib/lambda.ts +6 -6
  3. package/dist/app/api-destined-function/src/lib/lambda.d.ts +6 -6
  4. package/dist/app/api-destined-function/src/lib/lambda.js +6 -6
  5. package/dist/lib/lambda.d.ts +6 -6
  6. package/dist/lib/lambda.js +6 -6
  7. package/dist/lib/lambda.js.map +1 -1
  8. package/dist/src/lib/common/construct.d.ts +4 -7
  9. package/dist/src/lib/common/construct.js +4 -7
  10. package/dist/src/lib/common/stack.d.ts +9 -13
  11. package/dist/src/lib/common/stack.js +9 -13
  12. package/dist/src/lib/common/types.d.ts +0 -2
  13. package/dist/src/lib/construct/api-to-eventbridge-target/api.d.ts +0 -3
  14. package/dist/src/lib/construct/api-to-eventbridge-target/api.js +0 -3
  15. package/dist/src/lib/construct/api-to-eventbridge-target/event.d.ts +0 -3
  16. package/dist/src/lib/construct/api-to-eventbridge-target/event.js +0 -3
  17. package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +0 -27
  18. package/dist/src/lib/construct/api-to-eventbridge-target/main.js +41 -68
  19. package/dist/src/lib/construct/api-to-eventbridge-target/types.d.ts +13 -25
  20. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +0 -3
  21. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.js +0 -3
  22. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.d.ts +0 -37
  23. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.js +44 -81
  24. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/types.d.ts +1 -5
  25. package/dist/src/lib/construct/api-to-lambda-target/api.d.ts +0 -3
  26. package/dist/src/lib/construct/api-to-lambda-target/api.js +0 -3
  27. package/dist/src/lib/construct/api-to-lambda-target/main.d.ts +0 -14
  28. package/dist/src/lib/construct/api-to-lambda-target/main.js +7 -21
  29. package/dist/src/lib/construct/api-to-lambda-target/types.d.ts +7 -13
  30. package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +0 -18
  31. package/dist/src/lib/construct/graphql-api-lambda/main.js +1 -19
  32. package/dist/src/lib/construct/graphql-api-lambda/types.d.ts +4 -8
  33. package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +0 -11
  34. package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js +1 -12
  35. package/dist/src/lib/construct/graphql-api-lambda-with-cache/types.d.ts +1 -3
  36. package/dist/src/lib/construct/lambda-with-iam-access/main.d.ts +0 -12
  37. package/dist/src/lib/construct/lambda-with-iam-access/main.js +2 -14
  38. package/dist/src/lib/construct/rest-api-lambda/main.d.ts +0 -18
  39. package/dist/src/lib/construct/rest-api-lambda/main.js +1 -19
  40. package/dist/src/lib/construct/rest-api-lambda/types.d.ts +6 -10
  41. package/dist/src/lib/construct/rest-api-lambda-with-cache/main.d.ts +0 -11
  42. package/dist/src/lib/construct/rest-api-lambda-with-cache/main.js +3 -14
  43. package/dist/src/lib/construct/rest-api-lambda-with-cache/types.d.ts +1 -3
  44. package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +0 -25
  45. package/dist/src/lib/construct/site-with-ecs-backend/main.js +32 -52
  46. package/dist/src/lib/construct/site-with-ecs-backend/types.d.ts +10 -11
  47. package/dist/src/lib/construct/static-asset-deployment/main.d.ts +0 -8
  48. package/dist/src/lib/construct/static-asset-deployment/main.js +0 -8
  49. package/dist/src/lib/construct/static-asset-deployment/types.d.ts +1 -1
  50. package/dist/src/lib/construct/static-site/main.d.ts +0 -17
  51. package/dist/src/lib/construct/static-site/main.js +1 -18
  52. package/dist/src/lib/construct/static-site/types.d.ts +9 -11
  53. package/dist/src/lib/services/aws/api-gateway/main.d.ts +21 -25
  54. package/dist/src/lib/services/aws/api-gateway/main.js +42 -46
  55. package/dist/src/lib/services/aws/api-gateway/types.d.ts +0 -2
  56. package/dist/src/lib/services/aws/appconfig/constants.d.ts +0 -6
  57. package/dist/src/lib/services/aws/appconfig/constants.js +26 -32
  58. package/dist/src/lib/services/aws/appconfig/main.d.ts +16 -19
  59. package/dist/src/lib/services/aws/appconfig/main.js +19 -22
  60. package/dist/src/lib/services/aws/appconfig/types.d.ts +1 -3
  61. package/dist/src/lib/services/aws/certificate-manager/main.d.ts +5 -10
  62. package/dist/src/lib/services/aws/certificate-manager/main.js +5 -10
  63. package/dist/src/lib/services/aws/certificate-manager/types.d.ts +3 -5
  64. package/dist/src/lib/services/aws/cloudfront/main.d.ts +41 -47
  65. package/dist/src/lib/services/aws/cloudfront/main.js +56 -62
  66. package/dist/src/lib/services/aws/cloudfront/types.d.ts +1 -7
  67. package/dist/src/lib/services/aws/cloudtrail/main.d.ts +8 -12
  68. package/dist/src/lib/services/aws/cloudtrail/main.js +8 -12
  69. package/dist/src/lib/services/aws/cloudtrail/types.d.ts +0 -2
  70. package/dist/src/lib/services/aws/cloudwatch/logs.d.ts +11 -15
  71. package/dist/src/lib/services/aws/cloudwatch/logs.js +15 -19
  72. package/dist/src/lib/services/aws/cloudwatch/main.d.ts +80 -84
  73. package/dist/src/lib/services/aws/cloudwatch/main.js +116 -122
  74. package/dist/src/lib/services/aws/cloudwatch/types.d.ts +20 -42
  75. package/dist/src/lib/services/aws/codebuild/main.d.ts +0 -4
  76. package/dist/src/lib/services/aws/codebuild/main.js +3 -7
  77. package/dist/src/lib/services/aws/dynamodb/main.d.ts +3 -7
  78. package/dist/src/lib/services/aws/dynamodb/main.js +13 -17
  79. package/dist/src/lib/services/aws/dynamodb/types.d.ts +0 -2
  80. package/dist/src/lib/services/aws/elastic-container-registry/main.d.ts +3 -7
  81. package/dist/src/lib/services/aws/elastic-container-registry/main.js +3 -7
  82. package/dist/src/lib/services/aws/elastic-container-service/main.d.ts +19 -23
  83. package/dist/src/lib/services/aws/elastic-container-service/main.js +35 -39
  84. package/dist/src/lib/services/aws/elastic-container-service/types.d.ts +1 -9
  85. package/dist/src/lib/services/aws/elastic-file-system/main.d.ts +9 -13
  86. package/dist/src/lib/services/aws/elastic-file-system/main.js +14 -18
  87. package/dist/src/lib/services/aws/elastic-file-system/types.d.ts +1 -5
  88. package/dist/src/lib/services/aws/elastic-kubernetes-service/main.d.ts +5 -9
  89. package/dist/src/lib/services/aws/elastic-kubernetes-service/main.js +8 -12
  90. package/dist/src/lib/services/aws/elastic-kubernetes-service/types.d.ts +1 -3
  91. package/dist/src/lib/services/aws/elasticache/main.d.ts +14 -18
  92. package/dist/src/lib/services/aws/elasticache/main.js +35 -39
  93. package/dist/src/lib/services/aws/elasticache/types.d.ts +0 -4
  94. package/dist/src/lib/services/aws/eventbridge/main.d.ts +25 -29
  95. package/dist/src/lib/services/aws/eventbridge/main.js +34 -38
  96. package/dist/src/lib/services/aws/eventbridge/target.d.ts +6 -9
  97. package/dist/src/lib/services/aws/eventbridge/target.js +8 -10
  98. package/dist/src/lib/services/aws/eventbridge/types.d.ts +2 -10
  99. package/dist/src/lib/services/aws/evidently/main.d.ts +15 -19
  100. package/dist/src/lib/services/aws/evidently/main.js +19 -23
  101. package/dist/src/lib/services/aws/evidently/types.d.ts +0 -10
  102. package/dist/src/lib/services/aws/identity-access-management/main.d.ts +66 -70
  103. package/dist/src/lib/services/aws/identity-access-management/main.js +97 -101
  104. package/dist/src/lib/services/aws/key-management-service/main.d.ts +3 -7
  105. package/dist/src/lib/services/aws/key-management-service/main.js +6 -10
  106. package/dist/src/lib/services/aws/key-management-service/types.d.ts +0 -2
  107. package/dist/src/lib/services/aws/lambda/main.d.ts +42 -47
  108. package/dist/src/lib/services/aws/lambda/main.js +64 -69
  109. package/dist/src/lib/services/aws/lambda/types.d.ts +6 -16
  110. package/dist/src/lib/services/aws/route53/main.d.ts +17 -21
  111. package/dist/src/lib/services/aws/route53/main.js +19 -23
  112. package/dist/src/lib/services/aws/route53/types.d.ts +0 -2
  113. package/dist/src/lib/services/aws/secrets-manager/main.d.ts +6 -19
  114. package/dist/src/lib/services/aws/secrets-manager/main.js +6 -25
  115. package/dist/src/lib/services/aws/simple-notification-service/main.d.ts +8 -12
  116. package/dist/src/lib/services/aws/simple-notification-service/main.js +10 -14
  117. package/dist/src/lib/services/aws/simple-notification-service/types.d.ts +0 -2
  118. package/dist/src/lib/services/aws/simple-queue-service/main.d.ts +11 -15
  119. package/dist/src/lib/services/aws/simple-queue-service/main.js +19 -23
  120. package/dist/src/lib/services/aws/simple-queue-service/types.d.ts +4 -6
  121. package/dist/src/lib/services/aws/simple-storage-service/main.d.ts +24 -32
  122. package/dist/src/lib/services/aws/simple-storage-service/main.js +32 -40
  123. package/dist/src/lib/services/aws/simple-storage-service/types.d.ts +2 -8
  124. package/dist/src/lib/services/aws/step-function/main.d.ts +55 -59
  125. package/dist/src/lib/services/aws/step-function/main.js +91 -95
  126. package/dist/src/lib/services/aws/step-function/types.d.ts +0 -32
  127. package/dist/src/lib/services/aws/systems-manager/main.d.ts +10 -16
  128. package/dist/src/lib/services/aws/systems-manager/main.js +13 -19
  129. package/dist/src/lib/services/aws/systems-manager/types.d.ts +0 -2
  130. package/dist/src/lib/services/aws/virtual-private-cloud/main.d.ts +9 -12
  131. package/dist/src/lib/services/aws/virtual-private-cloud/main.js +10 -16
  132. package/dist/src/lib/services/aws/web-application-firewall/main.d.ts +6 -10
  133. package/dist/src/lib/services/aws/web-application-firewall/main.js +12 -16
  134. package/dist/src/lib/services/aws/web-application-firewall/types.d.ts +0 -4
  135. package/dist/src/lib/types/aws/index.d.ts +0 -2
  136. package/dist/src/lib/utils/aws/index.d.ts +6 -9
  137. package/dist/src/lib/utils/aws/index.js +7 -10
  138. package/dist/src/lib/utils/index.d.ts +6 -13
  139. package/dist/src/lib/utils/index.js +4 -12
  140. package/package.json +1 -1
  141. package/src/lib/common/construct.ts +4 -7
  142. package/src/lib/common/stack.ts +9 -13
  143. package/src/lib/common/types.ts +0 -2
  144. package/src/lib/construct/api-to-eventbridge-target/api.ts +0 -3
  145. package/src/lib/construct/api-to-eventbridge-target/event.ts +0 -3
  146. package/src/lib/construct/api-to-eventbridge-target/main.ts +41 -68
  147. package/src/lib/construct/api-to-eventbridge-target/types.ts +13 -25
  148. package/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +0 -3
  149. package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +44 -81
  150. package/src/lib/construct/api-to-eventbridge-target-with-sns/types.ts +1 -5
  151. package/src/lib/construct/api-to-lambda-target/api.ts +0 -3
  152. package/src/lib/construct/api-to-lambda-target/main.ts +7 -21
  153. package/src/lib/construct/api-to-lambda-target/types.ts +7 -13
  154. package/src/lib/construct/graphql-api-lambda/main.ts +1 -19
  155. package/src/lib/construct/graphql-api-lambda/types.ts +4 -8
  156. package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +1 -12
  157. package/src/lib/construct/graphql-api-lambda-with-cache/types.ts +1 -3
  158. package/src/lib/construct/lambda-with-iam-access/main.ts +2 -14
  159. package/src/lib/construct/rest-api-lambda/main.ts +1 -19
  160. package/src/lib/construct/rest-api-lambda/types.ts +6 -10
  161. package/src/lib/construct/rest-api-lambda-with-cache/main.ts +3 -14
  162. package/src/lib/construct/rest-api-lambda-with-cache/types.ts +1 -3
  163. package/src/lib/construct/site-with-ecs-backend/main.ts +31 -52
  164. package/src/lib/construct/site-with-ecs-backend/types.ts +10 -11
  165. package/src/lib/construct/static-asset-deployment/main.ts +0 -8
  166. package/src/lib/construct/static-asset-deployment/types.ts +1 -1
  167. package/src/lib/construct/static-site/main.ts +1 -18
  168. package/src/lib/construct/static-site/types.ts +9 -11
  169. package/src/lib/services/aws/api-gateway/main.ts +43 -47
  170. package/src/lib/services/aws/api-gateway/types.ts +0 -2
  171. package/src/lib/services/aws/appconfig/constants.ts +26 -32
  172. package/src/lib/services/aws/appconfig/main.ts +19 -22
  173. package/src/lib/services/aws/appconfig/types.ts +1 -3
  174. package/src/lib/services/aws/certificate-manager/main.ts +5 -10
  175. package/src/lib/services/aws/certificate-manager/types.ts +3 -5
  176. package/src/lib/services/aws/cloudfront/main.ts +56 -62
  177. package/src/lib/services/aws/cloudfront/types.ts +1 -7
  178. package/src/lib/services/aws/cloudtrail/main.ts +8 -12
  179. package/src/lib/services/aws/cloudtrail/types.ts +0 -2
  180. package/src/lib/services/aws/cloudwatch/logs.ts +15 -19
  181. package/src/lib/services/aws/cloudwatch/main.ts +116 -122
  182. package/src/lib/services/aws/cloudwatch/types.ts +20 -42
  183. package/src/lib/services/aws/codebuild/main.ts +3 -7
  184. package/src/lib/services/aws/dynamodb/main.ts +13 -17
  185. package/src/lib/services/aws/dynamodb/types.ts +0 -2
  186. package/src/lib/services/aws/elastic-container-registry/main.ts +3 -7
  187. package/src/lib/services/aws/elastic-container-service/main.ts +35 -39
  188. package/src/lib/services/aws/elastic-container-service/types.ts +1 -9
  189. package/src/lib/services/aws/elastic-file-system/main.ts +14 -18
  190. package/src/lib/services/aws/elastic-file-system/types.ts +1 -5
  191. package/src/lib/services/aws/elastic-kubernetes-service/main.ts +8 -12
  192. package/src/lib/services/aws/elastic-kubernetes-service/types.ts +1 -3
  193. package/src/lib/services/aws/elasticache/main.ts +35 -39
  194. package/src/lib/services/aws/elasticache/types.ts +0 -4
  195. package/src/lib/services/aws/eventbridge/main.ts +34 -38
  196. package/src/lib/services/aws/eventbridge/target.ts +8 -11
  197. package/src/lib/services/aws/eventbridge/types.ts +2 -10
  198. package/src/lib/services/aws/evidently/main.ts +19 -23
  199. package/src/lib/services/aws/evidently/types.ts +0 -10
  200. package/src/lib/services/aws/identity-access-management/main.ts +97 -101
  201. package/src/lib/services/aws/key-management-service/main.ts +6 -10
  202. package/src/lib/services/aws/key-management-service/types.ts +0 -2
  203. package/src/lib/services/aws/lambda/main.ts +64 -69
  204. package/src/lib/services/aws/lambda/types.ts +6 -16
  205. package/src/lib/services/aws/route53/main.ts +19 -23
  206. package/src/lib/services/aws/route53/types.ts +0 -2
  207. package/src/lib/services/aws/secrets-manager/main.ts +6 -28
  208. package/src/lib/services/aws/simple-notification-service/main.ts +10 -14
  209. package/src/lib/services/aws/simple-notification-service/types.ts +0 -2
  210. package/src/lib/services/aws/simple-queue-service/main.ts +19 -23
  211. package/src/lib/services/aws/simple-queue-service/types.ts +4 -6
  212. package/src/lib/services/aws/simple-storage-service/main.ts +32 -40
  213. package/src/lib/services/aws/simple-storage-service/types.ts +2 -8
  214. package/src/lib/services/aws/step-function/main.ts +91 -95
  215. package/src/lib/services/aws/step-function/types.ts +0 -32
  216. package/src/lib/services/aws/systems-manager/main.ts +13 -19
  217. package/src/lib/services/aws/systems-manager/types.ts +0 -2
  218. package/src/lib/services/aws/virtual-private-cloud/main.ts +10 -16
  219. package/src/lib/services/aws/web-application-firewall/main.ts +12 -16
  220. package/src/lib/services/aws/web-application-firewall/types.ts +0 -4
  221. package/src/lib/types/aws/index.ts +0 -2
  222. package/src/lib/utils/aws/index.ts +7 -10
  223. package/src/lib/utils/index.ts +4 -12
@@ -12,9 +12,6 @@ import { CloudFrontManager } from '../cloudfront'
12
12
  import { SsmManager } from '../systems-manager'
13
13
 
14
14
  /**
15
- * @stability stable
16
- * @category cdk-utils.lambda-manager
17
- * @subcategory Construct
18
15
  * @classdesc Provides operations on AWS Lambda.
19
16
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
20
17
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -28,20 +25,19 @@ import { SsmManager } from '../systems-manager'
28
25
  * this.lambdaManager.createLambdaFunction('MyFunction', this, role, layers, code)
29
26
  * }
30
27
  * }
31
- *
32
28
  * @see [CDK Lambda Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda-readme.html}
33
29
  */
34
30
  export class LambdaManager {
35
31
  /**
36
32
  * @summary Method to create a lambda layer (nodejs)
37
- * @param {string} id scoped id of the resource
38
- * @param {CommonConstruct} scope scope in which this resource is defined
39
- * @param {lambda.AssetCode} code
33
+ * @param id scoped id of the resource
34
+ * @param scope scope in which this resource is defined
35
+ * @param code
40
36
  */
41
37
  public createLambdaLayer(id: string, scope: CommonConstruct, code: lambda.AssetCode) {
42
38
  const lambdaLayer = new lambda.LayerVersion(scope, `${id}`, {
43
- compatibleRuntimes: [scope.props.nodejsRuntime ?? CommonStack.NODEJS_RUNTIME],
44
39
  code: code,
40
+ compatibleRuntimes: [scope.props.nodejsRuntime ?? CommonStack.NODEJS_RUNTIME],
45
41
  description: `${id}`,
46
42
  layerVersionName: `${id}-${scope.props.stage}`,
47
43
  })
@@ -53,19 +49,19 @@ export class LambdaManager {
53
49
 
54
50
  /**
55
51
  * @summary Method to create a lambda function (nodejs)
56
- * @param {string} id scoped id of the resource
57
- * @param {CommonConstruct} scope scope in which this resource is defined
58
- * @param {LambdaProps} props
59
- * @param {iam.Role | iam.CfnRole} role
60
- * @param {lambda.ILayerVersion[]} layers
61
- * @param {lambda.AssetCode} code
62
- * @param {string?} handler
63
- * @param {Map<string, string>?} environment
64
- * @param {ec2.IVpc?} vpc
65
- * @param {ec2.ISecurityGroup[]?} securityGroups
66
- * @param {efs.IAccessPoint?} accessPoint
67
- * @param {string?} mountPath
68
- * @param {ec2.SubnetSelection?} vpcSubnets
52
+ * @param id scoped id of the resource
53
+ * @param scope scope in which this resource is defined
54
+ * @param props
55
+ * @param role
56
+ * @param layers
57
+ * @param code
58
+ * @param handler
59
+ * @param environment
60
+ * @param vpc
61
+ * @param securityGroups
62
+ * @param accessPoint
63
+ * @param mountPath
64
+ * @param vpcSubnets
69
65
  */
70
66
  public createLambdaFunction(
71
67
  id: string,
@@ -96,15 +92,10 @@ export class LambdaManager {
96
92
  ...props,
97
93
  ...{
98
94
  allowPublicSubnet: !!vpc,
99
- functionName: functionName,
100
- handler: handler || 'index.lambda_handler',
101
- runtime: props.runtime ?? scope.props.nodejsRuntime ?? CommonStack.NODEJS_RUNTIME,
95
+ architecture: props.architecture ?? lambda.Architecture.ARM_64,
102
96
  code: code,
103
97
  deadLetterQueue: deadLetterQueue,
104
- architecture: props.architecture ?? lambda.Architecture.ARM_64,
105
98
  environment: {
106
- REGION: scope.props.region,
107
- STAGE: scope.props.stage,
108
99
  LAST_MODIFIED_TS: props.excludeLastModifiedTimestamp
109
100
  ? ''
110
101
  : scope.ssmManager.readStringParameter(
@@ -112,30 +103,35 @@ export class LambdaManager {
112
103
  scope,
113
104
  `${SsmManager.SECRETS_MODIFIED_TIMESTAMP_PARAM}-${scope.props.stage}`
114
105
  ),
106
+ REGION: scope.props.region,
107
+ STAGE: scope.props.stage,
115
108
  ...environment,
116
109
  },
117
110
  filesystem: accessPoint
118
111
  ? lambda.FileSystem.fromEfsAccessPoint(accessPoint, mountPath || '/mnt/msg')
119
112
  : undefined,
113
+ functionName: functionName,
114
+ handler: handler || 'index.lambda_handler',
115
+ insightsVersion: props.insightsVersion,
120
116
  layers: layers,
121
117
  logRetention: scope.props.logRetention ?? props.logRetention,
122
118
  reservedConcurrentExecutions:
123
119
  props.reservedConcurrentExecutions ?? scope.props.defaultReservedLambdaConcurrentExecutions,
124
120
  role: role instanceof iam.Role ? role : undefined,
121
+ runtime: props.runtime ?? scope.props.nodejsRuntime ?? CommonStack.NODEJS_RUNTIME,
125
122
  securityGroups: securityGroups,
126
123
  timeout: props.timeoutInSecs ? cdk.Duration.seconds(props.timeoutInSecs) : cdk.Duration.minutes(15),
127
- vpc: vpc,
128
- vpcSubnets: vpcSubnets,
129
124
  tracing: scope.props.defaultTracing ?? props.tracing,
130
- insightsVersion: props.insightsVersion,
125
+ vpc,
126
+ vpcSubnets,
131
127
  },
132
128
  })
133
129
 
134
130
  if (lambdaFunction.deadLetterQueue && props.dlq?.retriesEnabled) {
135
131
  lambdaFunction.addEventSource(
136
132
  new eventSources.SqsEventSource(lambdaFunction.deadLetterQueue, {
137
- reportBatchItemFailures: true,
138
133
  batchSize: props.dlq.retryBatchSize ?? 1,
134
+ reportBatchItemFailures: true,
139
135
  })
140
136
  )
141
137
  }
@@ -170,18 +166,17 @@ export class LambdaManager {
170
166
 
171
167
  /**
172
168
  * @summary Method to provision a Lambda@Edge function
173
- *
174
- * @param {string} id scoped id of the resource
175
- * @param {CommonConstruct} scope scope in which this resource is defined
176
- * @param {LambdaEdgeProps} props lambda@edge properties
177
- * @param {lambda.ILayerVersion[]} layers
178
- * @param {lambda.AssetCode} code
179
- * @param {iam.Role} role
180
- * @param {Map<string, string>?} environment
181
- * @param {ec2.IVpc?} vpc
182
- * @param {ec2.ISecurityGroup[]?} securityGroups
183
- * @param {efs.IAccessPoint?} accessPoint
184
- * @param {string?} mountPath
169
+ * @param id scoped id of the resource
170
+ * @param scope scope in which this resource is defined
171
+ * @param props lambda@edge properties
172
+ * @param layers
173
+ * @param code
174
+ * @param role
175
+ * @param environment
176
+ * @param vpc
177
+ * @param securityGroups
178
+ * @param accessPoint
179
+ * @param mountPath
185
180
  */
186
181
  public createEdgeFunction(
187
182
  id: string,
@@ -213,17 +208,17 @@ export class LambdaManager {
213
208
 
214
209
  /**
215
210
  * @summary Method to create a lambda function (nodejs) with docker image
216
- * @param {string} id scoped id of the resource
217
- * @param {CommonConstruct} scope scope in which this resource is defined
218
- * @param {LambdaProps} props
219
- * @param {iam.Role | iam.CfnRole} role
220
- * @param {lambda.DockerImageCode} code
221
- * @param {Map<string, string>?} environment
222
- * @param {ec2.IVpc?} vpc
223
- * @param {ec2.ISecurityGroup[]?} securityGroups
224
- * @param {efs.IAccessPoint?} accessPoint
225
- * @param {string?} mountPath
226
- * @param {ec2.SubnetSelection?} vpcSubnets
211
+ * @param id scoped id of the resource
212
+ * @param scope scope in which this resource is defined
213
+ * @param props
214
+ * @param role
215
+ * @param code
216
+ * @param environment
217
+ * @param vpc
218
+ * @param securityGroups
219
+ * @param accessPoint
220
+ * @param mountPath
221
+ * @param vpcSubnets
227
222
  */
228
223
  public createLambdaDockerFunction(
229
224
  id: string,
@@ -252,14 +247,10 @@ export class LambdaManager {
252
247
  ...props,
253
248
  ...{
254
249
  allowPublicSubnet: !!vpc,
255
- functionName: functionName,
256
- runtime: props.runtime ?? scope.props.nodejsRuntime ?? CommonStack.NODEJS_RUNTIME,
250
+ architecture: props.architecture ?? lambda.Architecture.ARM_64,
257
251
  code: code,
258
252
  deadLetterQueue: deadLetterQueue,
259
- architecture: props.architecture ?? lambda.Architecture.ARM_64,
260
253
  environment: {
261
- REGION: scope.props.region,
262
- STAGE: scope.props.stage,
263
254
  LAST_MODIFIED_TS: props.excludeLastModifiedTimestamp
264
255
  ? ''
265
256
  : scope.ssmManager.readStringParameter(
@@ -267,28 +258,32 @@ export class LambdaManager {
267
258
  scope,
268
259
  `${SsmManager.SECRETS_MODIFIED_TIMESTAMP_PARAM}-${scope.props.stage}`
269
260
  ),
261
+ REGION: scope.props.region,
262
+ STAGE: scope.props.stage,
270
263
  ...environment,
271
264
  },
272
265
  filesystem: accessPoint
273
266
  ? lambda.FileSystem.fromEfsAccessPoint(accessPoint, mountPath || '/mnt/msg')
274
267
  : undefined,
268
+ functionName: functionName,
269
+ insightsVersion: props.insightsVersion,
275
270
  logRetention: scope.props.logRetention ?? props.logRetention,
276
271
  reservedConcurrentExecutions: props.reservedConcurrentExecutions,
277
272
  role: role instanceof iam.Role ? role : undefined,
273
+ runtime: props.runtime ?? scope.props.nodejsRuntime ?? CommonStack.NODEJS_RUNTIME,
278
274
  securityGroups: securityGroups,
279
275
  timeout: props.timeoutInSecs ? cdk.Duration.seconds(props.timeoutInSecs) : cdk.Duration.minutes(1),
280
- vpc: vpc,
281
- vpcSubnets: vpcSubnets,
282
276
  tracing: props.tracing,
283
- insightsVersion: props.insightsVersion,
277
+ vpc,
278
+ vpcSubnets,
284
279
  },
285
280
  })
286
281
 
287
282
  if (lambdaFunction.deadLetterQueue && props.dlq?.retriesEnabled) {
288
283
  lambdaFunction.addEventSource(
289
284
  new eventSources.SqsEventSource(lambdaFunction.deadLetterQueue, {
290
- reportBatchItemFailures: true,
291
285
  batchSize: props.dlq.retryBatchSize ?? 1,
286
+ reportBatchItemFailures: true,
292
287
  })
293
288
  )
294
289
  }
@@ -301,10 +296,10 @@ export class LambdaManager {
301
296
 
302
297
  /**
303
298
  * @summary Method to create a lambda function Alias
304
- * @param {string} id scoped id of the resource
305
- * @param {CommonConstruct} scope scope in which this resource is defined
306
- * @param {LambdaAliasProps} props
307
- * @param {IVersion} lambdaVersion
299
+ * @param id scoped id of the resource
300
+ * @param scope scope in which this resource is defined
301
+ * @param props
302
+ * @param lambdaVersion
308
303
  */
309
304
  public createLambdaFunctionAlias(
310
305
  id: string,
@@ -317,15 +312,15 @@ export class LambdaManager {
317
312
  const lambdaFunctionAlias = new lambda.Alias(scope, `${id}`, {
318
313
  ...props,
319
314
  ...{
320
- aliasName: props.aliasName,
321
- version: lambdaVersion,
322
315
  additionalVersions: props.additionalVersions,
316
+ aliasName: props.aliasName,
323
317
  description: props.description,
324
318
  maxEventAge: props.maxEventAge,
325
319
  onFailure: props.onFailure,
326
320
  onSuccess: props.onSuccess,
327
321
  provisionedConcurrentExecutions: props.provisionedConcurrentExecutions,
328
322
  retryAttempts: props.retryAttempts,
323
+ version: lambdaVersion,
329
324
  },
330
325
  })
331
326
 
@@ -4,31 +4,25 @@ import { EdgeFunctionProps } from 'aws-cdk-lib/aws-cloudfront/lib/experimental'
4
4
  import { QueueProps } from '../simple-queue-service'
5
5
 
6
6
  /**
7
- * @category cdk-utils.lambda-manager
8
- * @subcategory Properties
9
7
  */
10
8
  export interface ProvisionedConcurrencyProps {
11
- minCapacity: number
12
9
  maxCapacity: number
10
+ minCapacity: number
13
11
  utilizationTarget: number
14
12
  }
15
13
 
16
14
  /**
17
- * @category cdk-utils.lambda-manager
18
- * @subcategory Properties
19
15
  */
20
16
  export interface LambdaProps extends FunctionProps {
21
17
  dlq?: QueueProps
22
- redriveq?: QueueProps
23
- timeoutInSecs?: number
24
18
  excludeLastModifiedTimestamp?: boolean
25
- tags?: TagProps[]
26
19
  lambdaAliases?: LambdaAliasProps[]
20
+ redriveq?: QueueProps
21
+ tags?: TagProps[]
22
+ timeoutInSecs?: number
27
23
  }
28
24
 
29
25
  /**
30
- * @category cdk-utils.lambda-manager
31
- * @subcategory Properties
32
26
  */
33
27
  export interface LambdaAliasProps extends AliasProps {
34
28
  id?: string
@@ -36,21 +30,17 @@ export interface LambdaAliasProps extends AliasProps {
36
30
  }
37
31
 
38
32
  /**
39
- * @category cdk-utils.lambda-manager
40
- * @subcategory Properties
41
33
  */
42
34
  export interface LambdaEdgeProps extends EdgeFunctionProps {
43
- timeoutInSecs?: number
44
35
  tags?: TagProps[]
36
+ timeoutInSecs?: number
45
37
  }
46
38
 
47
39
  /**
48
- * @category cdk-utils.lambda-manager
49
- * @subcategory Types
50
40
  */
51
41
  export interface LambdaEnvironment {
52
- NODE_ENV: string
53
42
  LOG_LEVEL: string
43
+ NODE_ENV: string
54
44
  REGION?: string
55
45
  STAGE?: string
56
46
  TZ: string
@@ -7,9 +7,6 @@ import { CommonConstruct } from '../../../common'
7
7
  import { Route53Props } from './types'
8
8
 
9
9
  /**
10
- * @stability stable
11
- * @category cdk-utils.route53-manager
12
- * @subcategory Construct
13
10
  * @classdesc Provides operations on AWS Route53.
14
11
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
15
12
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -23,15 +20,14 @@ import { Route53Props } from './types'
23
20
  * this.route53Manager.createHostedZone('MyHostedZone', this)
24
21
  * }
25
22
  * }
26
- *
27
23
  * @see [CDK Route53 Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_route53-readme.html}
28
24
  */
29
25
  export class Route53Manager {
30
26
  /**
31
27
  * @summary Method to create a hosted zone
32
- * @param {string} id scoped id of the resource
33
- * @param {CommonConstruct} scope scope in which this resource is defined
34
- * @param {Route53Props} props
28
+ * @param id scoped id of the resource
29
+ * @param scope scope in which this resource is defined
30
+ * @param props
35
31
  */
36
32
  public createHostedZone(id: string, scope: CommonConstruct, props: Route53Props) {
37
33
  let hostedZone: route53.IHostedZone
@@ -44,8 +40,8 @@ export class Route53Manager {
44
40
  })
45
41
  } else {
46
42
  hostedZone = new route53.HostedZone(scope, `${id}`, {
47
- zoneName: scope.props.domainName,
48
43
  comment: `Hosted zone for ${scope.props.domainName}`,
44
+ zoneName: scope.props.domainName,
49
45
  })
50
46
  }
51
47
 
@@ -57,8 +53,8 @@ export class Route53Manager {
57
53
 
58
54
  /**
59
55
  * @summary Method to create/lookup a hosted zone
60
- * @param {string} id scoped id of the resource
61
- * @param {CommonConstruct} scope scope in which this resource is defined
56
+ * @param id scoped id of the resource
57
+ * @param scope scope in which this resource is defined
62
58
  * @param useExistingHostedZone Flag to indicate whether to lookup vs create new hosted zone
63
59
  */
64
60
  public withHostedZoneFromFullyQualifiedDomainName(
@@ -74,8 +70,8 @@ export class Route53Manager {
74
70
  })
75
71
  } else {
76
72
  hostedZone = new route53.HostedZone(scope, `${id}`, {
77
- zoneName: scope.fullyQualifiedDomainName,
78
73
  comment: `Hosted zone for ${scope.fullyQualifiedDomainName}`,
74
+ zoneName: scope.fullyQualifiedDomainName,
79
75
  })
80
76
  }
81
77
 
@@ -87,11 +83,11 @@ export class Route53Manager {
87
83
 
88
84
  /**
89
85
  * @summary Method to create a-record for cloudfront target
90
- * @param {string} id scoped id of the resource
91
- * @param {CommonConstruct} scope scope in which this resource is defined
92
- * @param {cloudfront.IDistribution} distribution
93
- * @param {route53.IHostedZone} hostedZone
94
- * @param {string} recordName
86
+ * @param id scoped id of the resource
87
+ * @param scope scope in which this resource is defined
88
+ * @param distribution
89
+ * @param hostedZone
90
+ * @param recordName
95
91
  * @param skipStageFromRecord
96
92
  */
97
93
  public createCloudFrontTargetARecord(
@@ -121,11 +117,11 @@ export class Route53Manager {
121
117
 
122
118
  /**
123
119
  * @summary Method to create a-record for cloudfront target
124
- * @param {string} id scoped id of the resource
125
- * @param {CommonConstruct} scope scope in which this resource is defined
126
- * @param {cloudfront.IDistribution} distribution
127
- * @param {route53.IHostedZone} hostedZone
128
- * @param {string} recordName
120
+ * @param id scoped id of the resource
121
+ * @param scope scope in which this resource is defined
122
+ * @param distribution
123
+ * @param hostedZone
124
+ * @param recordName
129
125
  */
130
126
  public createCloudFrontTargetARecordV2(
131
127
  id: string,
@@ -150,8 +146,8 @@ export class Route53Manager {
150
146
 
151
147
  /**
152
148
  * @summary Method to create a-record for restApi gateway target
153
- * @param {string} id scoped id of the resource
154
- * @param {CommonConstruct} scope scope in which this resource is defined
149
+ * @param id scoped id of the resource
150
+ * @param scope scope in which this resource is defined
155
151
  * @param recordName
156
152
  * @param apiDomain
157
153
  * @param hostedZone
@@ -1,8 +1,6 @@
1
1
  import { HostedZoneProps } from 'aws-cdk-lib/aws-route53'
2
2
 
3
3
  /**
4
- * @category cdk-utils.route53-manager
5
- * @subcategory Properties
6
4
  */
7
5
  export interface Route53Props extends HostedZoneProps {
8
6
  useExistingHostedZone?: boolean
@@ -5,9 +5,6 @@ import * as utils from '../../../utils'
5
5
  import { CommonConstruct } from '../../../common'
6
6
 
7
7
  /**
8
- * @stability experimental
9
- * @category cdk-utils.secrets-manager
10
- * @subcategory Construct
11
8
  * @classdesc Provides operations on AWS Secrets Manager.
12
9
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
13
10
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -21,48 +18,29 @@ import { CommonConstruct } from '../../../common'
21
18
  * this.secretsManager.loadSecret('MySecretName', 'eu-west-1')
22
19
  * }
23
20
  * }
24
- *
25
21
  * @see [CDK Secrets Manager Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager-readme.html}
26
22
  */
27
23
  export class SecretsManager {
28
24
  /**
29
25
  *
30
- * @param {string} region
26
+ * @param region
31
27
  */
32
28
  public getAwsSecretsManager(region: string) {
33
29
  return new SM({ region: region })
34
30
  }
35
31
 
36
32
  /**
37
- * @stability experimental
38
33
  * @summary Method to load a secret from secrets manager
39
- * @param {string} secretName
40
- * @param {string} region
34
+ * @param secretName
35
+ * @param region
41
36
  */
42
37
  public async loadSecret(secretName: string, region: string) {
43
38
  const secretsManager = this.getAwsSecretsManager(region)
44
39
  const secret: any = await Promise.all([secretsManager.getSecretValue({ SecretId: secretName })])
45
-
46
40
  return secret ? JSON.parse(secret[0].SecretString) : {}
47
41
  }
48
42
 
49
43
  /**
50
- * @stability experimental
51
- * @summary Method to load secrets from secrets manager
52
- * @param {string} secretNames
53
- * @param {string} region
54
- */
55
- public async loadSecrets(secretNames: string, region: string) {
56
- let secrets = {}
57
- for (const secretName of secretNames.split(',')) {
58
- secrets = { ...secrets, ...(await this.loadSecret(secretName, region)) }
59
- }
60
-
61
- return secrets
62
- }
63
-
64
- /**
65
- * @stability stable
66
44
  * @summary Method to retrieve a secret from secrets manager with a cloudformation export
67
45
  * @param id
68
46
  * @param scope
@@ -79,9 +57,9 @@ export class SecretsManager {
79
57
 
80
58
  /**
81
59
  * @summary Method to create a secret
82
- * @param {string} id scoped id of the resource
83
- * @param {CommonConstruct} scope scope in which this resource is defined
84
- * @param {secretsManager.SecretProps} props the secret properties
60
+ * @param id scoped id of the resource
61
+ * @param scope scope in which this resource is defined
62
+ * @param props the secret properties
85
63
  */
86
64
  public createSecret(id: string, scope: CommonConstruct, props: secretsManager.SecretProps) {
87
65
  const secret = new secretsManager.Secret(scope, `${id}`, {
@@ -6,9 +6,6 @@ import { CommonConstruct } from '../../../common'
6
6
  import { SubscriptionProps } from './types'
7
7
 
8
8
  /**
9
- * @stability stable
10
- * @category cdk-utils.sns-manager
11
- * @subcategory Construct
12
9
  * @classdesc Provides operations on AWS Simple Notification Service.
13
10
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
14
11
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -22,16 +19,15 @@ import { SubscriptionProps } from './types'
22
19
  * this.snsManager.createEmailNotificationService('MySns', 'eu-west-1', ["test@example.com"])
23
20
  * }
24
21
  * }
25
- *
26
22
  * @see [CDK Simple Notification Service Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sns-readme.html}
27
23
  */
28
24
  export class SnsManager {
29
25
  /**
30
26
  * @summary Method to create an email notification service
31
- * @param {string} id scoped id of the resource
32
- * @param {CommonConstruct} scope scope in which this resource is defined
33
- * @param {SubscriptionProps} props
34
- * @param {string[]} emails
27
+ * @param id scoped id of the resource
28
+ * @param scope scope in which this resource is defined
29
+ * @param props
30
+ * @param emails
35
31
  */
36
32
  public createEmailNotificationService(
37
33
  id: string,
@@ -43,8 +39,8 @@ export class SnsManager {
43
39
 
44
40
  const topic = new sns.Topic(scope, id, {
45
41
  displayName: `${props.topicName}-${scope.props.stage}`,
46
- topicName: `${props.topicName}-${scope.props.stage}`,
47
42
  fifo: props.fifo,
43
+ topicName: `${props.topicName}-${scope.props.stage}`,
48
44
  })
49
45
 
50
46
  if (emails && emails.length > 0) {
@@ -59,10 +55,10 @@ export class SnsManager {
59
55
 
60
56
  /**
61
57
  * @summary Method to create a lambda notification service
62
- * @param {string} id scoped id of the resource
63
- * @param {CommonConstruct} scope scope in which this resource is defined
64
- * @param {SubscriptionProps} props
65
- * @param {lambda.IFunction} lambdaFunction
58
+ * @param id scoped id of the resource
59
+ * @param scope scope in which this resource is defined
60
+ * @param props
61
+ * @param lambdaFunction
66
62
  */
67
63
  public createLambdaNotificationService(
68
64
  id: string,
@@ -74,8 +70,8 @@ export class SnsManager {
74
70
 
75
71
  const topic = new sns.Topic(scope, id, {
76
72
  displayName: `${props.topicName}-${scope.props.stage}`,
77
- topicName: `${props.topicName}-${scope.props.stage}`,
78
73
  fifo: props.fifo,
74
+ topicName: `${props.topicName}-${scope.props.stage}`,
79
75
  })
80
76
 
81
77
  topic.addSubscription(new subs.LambdaSubscription(lambdaFunction))
@@ -1,7 +1,5 @@
1
1
  import { TopicProps } from 'aws-cdk-lib/aws-sns'
2
2
 
3
3
  /**
4
- * @category cdk-utils.sns-manager
5
- * @subcategory Properties
6
4
  */
7
5
  export interface SubscriptionProps extends TopicProps {}
@@ -6,9 +6,6 @@ import { QueueProps } from './types'
6
6
  import { LambdaProps } from '../lambda'
7
7
 
8
8
  /**
9
- * @stability stable
10
- * @category cdk-utils.sqs-manager
11
- * @subcategory Construct
12
9
  * @classdesc Provides operations on AWS Simple Queue Service.
13
10
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
14
11
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -22,35 +19,27 @@ import { LambdaProps } from '../lambda'
22
19
  * this.sqsManager.createQueue('MySqs', this, {...})
23
20
  * }
24
21
  * }
25
- *
26
22
  * @see [CDK Simple Queue Service Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs-readme.html}
27
23
  */
28
24
  export class SqsManager {
29
25
  /**
30
26
  * @summary Method to create a lambda queue service
31
- * @param {string} id scoped id of the resource
32
- * @param {CommonConstruct} scope scope in which this resource is defined
33
- * @param {QueueProps} props
34
- * @param {sqs.IQueue} deadLetterQueue
27
+ * @param id scoped id of the resource
28
+ * @param scope scope in which this resource is defined
29
+ * @param props
30
+ * @param deadLetterQueue
35
31
  */
36
32
  public createQueue(id: string, scope: CommonConstruct, props: QueueProps, deadLetterQueue?: sqs.IQueue) {
37
33
  if (!props) throw `Queue props undefined for ${id}`
38
34
 
39
35
  const queue = new sqs.Queue(scope, id, {
40
- queueName: props.queueName,
41
- visibilityTimeout: props.visibilityTimeoutInSecs
42
- ? cdk.Duration.seconds(props.visibilityTimeoutInSecs)
43
- : props.visibilityTimeout,
44
- receiveMessageWaitTime: props.receiveMessageWaitTimeInSecs
45
- ? cdk.Duration.seconds(props.receiveMessageWaitTimeInSecs)
46
- : props.receiveMessageWaitTime,
47
36
  contentBasedDeduplication: props.contentBasedDeduplication,
48
37
  dataKeyReuse: props.dataKeyReuseInSecs ? cdk.Duration.seconds(props.dataKeyReuseInSecs) : props.dataKeyReuse,
49
38
  deadLetterQueue: !deadLetterQueue
50
39
  ? undefined
51
40
  : {
52
- queue: deadLetterQueue,
53
41
  maxReceiveCount: props.maxReceiveCount ?? 5,
42
+ queue: deadLetterQueue,
54
43
  },
55
44
  deduplicationScope: props.deduplicationScope,
56
45
  deliveryDelay: props.deliveryDelayInSecs ? cdk.Duration.seconds(props.deliveryDelayInSecs) : undefined,
@@ -59,8 +48,15 @@ export class SqsManager {
59
48
  fifo: props.fifo,
60
49
  fifoThroughputLimit: props.fifoThroughputLimit,
61
50
  maxMessageSizeBytes: props.maxMessageSizeBytes,
51
+ queueName: props.queueName,
52
+ receiveMessageWaitTime: props.receiveMessageWaitTimeInSecs
53
+ ? cdk.Duration.seconds(props.receiveMessageWaitTimeInSecs)
54
+ : props.receiveMessageWaitTime,
62
55
  removalPolicy: props.removalPolicy ?? cdk.RemovalPolicy.DESTROY,
63
56
  retentionPeriod: props.retentionInDays ? cdk.Duration.days(props.retentionInDays) : cdk.Duration.days(7),
57
+ visibilityTimeout: props.visibilityTimeoutInSecs
58
+ ? cdk.Duration.seconds(props.visibilityTimeoutInSecs)
59
+ : props.visibilityTimeout,
64
60
  })
65
61
 
66
62
  if (props.tags && props.tags.length > 0) {
@@ -78,9 +74,9 @@ export class SqsManager {
78
74
 
79
75
  /**
80
76
  * @summary Method to create a redrive queue for a lambda function
81
- * @param {string} id scoped id of the resource
82
- * @param {CommonConstruct} scope scope in which this resource is defined
83
- * @param {LambdaProps} props the lambda properties
77
+ * @param id scoped id of the resource
78
+ * @param scope scope in which this resource is defined
79
+ * @param props the lambda properties
84
80
  */
85
81
  public createRedriveQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps) {
86
82
  return this.createQueue(`${id}`, scope, {
@@ -93,10 +89,10 @@ export class SqsManager {
93
89
 
94
90
  /**
95
91
  * @summary Method to create a dead letter queue for a lambda function
96
- * @param {string} id scoped id of the resource
97
- * @param {CommonConstruct} scope scope in which this resource is defined
98
- * @param {LambdaProps} props the lambda properties
99
- * @param {sqs.IQueue} deadLetterQueue
92
+ * @param id scoped id of the resource
93
+ * @param scope scope in which this resource is defined
94
+ * @param props the lambda properties
95
+ * @param deadLetterQueue
100
96
  */
101
97
  public createDeadLetterQueueForLambda(
102
98
  id: string,