@gradientedge/cdk-utils 8.118.0 → 8.120.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 (309) hide show
  1. package/app/api-destined-function/package.json +1 -1
  2. package/dist/src/lib/common/construct.d.ts +32 -32
  3. package/dist/src/lib/common/construct.js +36 -59
  4. package/dist/src/lib/common/stack.d.ts +8 -7
  5. package/dist/src/lib/common/stack.js +17 -37
  6. package/dist/src/lib/common/types.d.ts +2 -2
  7. package/dist/src/lib/construct/api-to-eventbridge-target/api.d.ts +22 -22
  8. package/dist/src/lib/construct/api-to-eventbridge-target/event.d.ts +9 -9
  9. package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +3 -3
  10. package/dist/src/lib/construct/api-to-eventbridge-target/main.js +37 -60
  11. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +9 -9
  12. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.d.ts +3 -3
  13. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.js +40 -63
  14. package/dist/src/lib/construct/api-to-lambda-target/api.d.ts +23 -23
  15. package/dist/src/lib/construct/api-to-lambda-target/main.d.ts +2 -2
  16. package/dist/src/lib/construct/api-to-lambda-target/main.js +15 -38
  17. package/dist/src/lib/construct/application-configuration/main.d.ts +7 -7
  18. package/dist/src/lib/construct/application-configuration/main.js +17 -41
  19. package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +17 -17
  20. package/dist/src/lib/construct/graphql-api-lambda/main.js +6 -29
  21. package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +5 -5
  22. package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js +7 -7
  23. package/dist/src/lib/construct/lambda-with-iam-access/main.d.ts +16 -16
  24. package/dist/src/lib/construct/lambda-with-iam-access/main.js +8 -31
  25. package/dist/src/lib/construct/lambda-with-iam-access/types.d.ts +4 -4
  26. package/dist/src/lib/construct/rest-api-lambda/main.d.ts +16 -16
  27. package/dist/src/lib/construct/rest-api-lambda/main.js +5 -28
  28. package/dist/src/lib/construct/rest-api-lambda-with-cache/main.d.ts +5 -5
  29. package/dist/src/lib/construct/rest-api-lambda-with-cache/main.js +9 -32
  30. package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +38 -39
  31. package/dist/src/lib/construct/site-with-ecs-backend/main.js +33 -54
  32. package/dist/src/lib/construct/static-asset-deployment/main.d.ts +4 -4
  33. package/dist/src/lib/construct/static-asset-deployment/main.js +3 -26
  34. package/dist/src/lib/construct/static-site/main.d.ts +15 -15
  35. package/dist/src/lib/construct/static-site/main.js +4 -27
  36. package/dist/src/lib/services/{aws/api-gateway → api-gateway}/main.d.ts +10 -10
  37. package/dist/src/lib/services/{aws/api-gateway → api-gateway}/main.js +21 -44
  38. package/dist/src/lib/services/api-gateway/types.d.ts +7 -0
  39. package/dist/src/lib/services/{aws/appconfig → appconfig}/main.d.ts +7 -7
  40. package/dist/src/lib/services/{aws/appconfig → appconfig}/main.js +14 -37
  41. package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/main.d.ts +5 -5
  42. package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/main.js +10 -33
  43. package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/types.d.ts +2 -2
  44. package/dist/src/lib/services/{aws/cloudfront → cloudfront}/main.d.ts +19 -19
  45. package/dist/src/lib/services/{aws/cloudfront → cloudfront}/main.js +47 -46
  46. package/dist/src/lib/services/{aws/cloudfront → cloudfront}/types.d.ts +3 -4
  47. package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/main.d.ts +6 -6
  48. package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/main.js +5 -28
  49. package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.d.ts +1 -1
  50. package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.js +1 -1
  51. package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/main.d.ts +1 -1
  52. package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/main.js +1 -1
  53. package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/types.d.ts +1 -1
  54. package/dist/src/lib/services/{aws/codebuild → codebuild}/main.d.ts +4 -4
  55. package/dist/src/lib/services/{aws/codebuild → codebuild}/main.js +7 -30
  56. package/dist/src/lib/services/{aws/dynamodb → dynamodb}/main.d.ts +4 -4
  57. package/dist/src/lib/services/{aws/dynamodb → dynamodb}/main.js +8 -31
  58. package/dist/src/lib/services/{aws/dynamodb → dynamodb}/types.d.ts +1 -1
  59. package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/main.d.ts +3 -3
  60. package/dist/src/lib/services/elastic-container-registry/main.js +37 -0
  61. package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.d.ts +11 -11
  62. package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.js +27 -50
  63. package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.d.ts +4 -4
  64. package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.d.ts +4 -4
  65. package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.js +12 -35
  66. package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.d.ts +5 -5
  67. package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.js +8 -31
  68. package/dist/src/lib/services/{aws/elasticache → elasticache}/main.d.ts +5 -5
  69. package/dist/src/lib/services/{aws/elasticache → elasticache}/main.js +10 -33
  70. package/dist/src/lib/services/{aws/eventbridge → eventbridge}/main.d.ts +14 -14
  71. package/dist/src/lib/services/{aws/eventbridge → eventbridge}/main.js +26 -49
  72. package/dist/src/lib/services/{aws/eventbridge → eventbridge}/target.d.ts +11 -11
  73. package/dist/src/lib/services/{aws/eventbridge → eventbridge}/target.js +6 -29
  74. package/dist/src/lib/services/{aws/eventbridge → eventbridge}/types.d.ts +1 -1
  75. package/dist/src/lib/services/{aws/evidently → evidently}/main.d.ts +8 -8
  76. package/dist/src/lib/services/{aws/evidently → evidently}/main.js +18 -41
  77. package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/main.d.ts +49 -50
  78. package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/main.js +110 -133
  79. package/dist/src/lib/services/index.d.ts +28 -1
  80. package/dist/src/lib/services/index.js +28 -1
  81. package/dist/src/lib/services/{aws/key-management-service → key-management-service}/main.d.ts +3 -3
  82. package/dist/src/lib/services/{aws/key-management-service → key-management-service}/main.js +5 -28
  83. package/dist/src/lib/services/{aws/lambda → lambda}/main.d.ts +12 -14
  84. package/dist/src/lib/services/{aws/lambda → lambda}/main.js +32 -59
  85. package/dist/src/lib/services/{aws/lambda → lambda}/types.d.ts +1 -1
  86. package/dist/src/lib/services/{aws/route53 → route53}/main.d.ts +10 -10
  87. package/dist/src/lib/services/{aws/route53 → route53}/main.js +21 -44
  88. package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/main.d.ts +6 -7
  89. package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/main.js +10 -33
  90. package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.d.ts +5 -5
  91. package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.js +11 -34
  92. package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.d.ts +7 -8
  93. package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.js +15 -38
  94. package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.d.ts +1 -1
  95. package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.d.ts +10 -11
  96. package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.js +31 -54
  97. package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.d.ts +1 -1
  98. package/dist/src/lib/services/{aws/step-function → step-function}/main.d.ts +32 -33
  99. package/dist/src/lib/services/{aws/step-function → step-function}/main.js +33 -57
  100. package/dist/src/lib/services/{aws/systems-manager → systems-manager}/main.d.ts +5 -5
  101. package/dist/src/lib/services/{aws/systems-manager → systems-manager}/main.js +10 -33
  102. package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/main.d.ts +6 -7
  103. package/dist/src/lib/services/virtual-private-cloud/main.js +70 -0
  104. package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.d.ts +4 -4
  105. package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.js +8 -31
  106. package/dist/src/lib/utils/aws/index.d.ts +6 -3
  107. package/dist/src/lib/utils/aws/index.js +9 -26
  108. package/package.json +15 -15
  109. package/src/lib/common/construct.ts +97 -67
  110. package/src/lib/common/stack.ts +12 -12
  111. package/src/lib/common/types.ts +2 -2
  112. package/src/lib/construct/api-to-eventbridge-target/api.ts +31 -22
  113. package/src/lib/construct/api-to-eventbridge-target/event.ts +9 -9
  114. package/src/lib/construct/api-to-eventbridge-target/main.ts +56 -41
  115. package/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +9 -9
  116. package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +62 -47
  117. package/src/lib/construct/api-to-lambda-target/api.ts +33 -23
  118. package/src/lib/construct/api-to-lambda-target/main.ts +24 -18
  119. package/src/lib/construct/application-configuration/main.ts +31 -24
  120. package/src/lib/construct/graphql-api-lambda/main.ts +22 -22
  121. package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +13 -13
  122. package/src/lib/construct/lambda-with-iam-access/main.ts +25 -25
  123. package/src/lib/construct/lambda-with-iam-access/types.ts +4 -4
  124. package/src/lib/construct/rest-api-lambda/main.ts +21 -21
  125. package/src/lib/construct/rest-api-lambda-with-cache/main.ts +14 -14
  126. package/src/lib/construct/site-with-ecs-backend/main.ts +79 -60
  127. package/src/lib/construct/static-asset-deployment/main.ts +6 -6
  128. package/src/lib/construct/static-site/main.ts +23 -17
  129. package/src/lib/services/{aws/api-gateway → api-gateway}/main.ts +42 -36
  130. package/src/lib/services/api-gateway/types.ts +8 -0
  131. package/src/lib/services/{aws/appconfig → appconfig}/main.ts +19 -19
  132. package/src/lib/services/{aws/certificate-manager → certificate-manager}/main.ts +14 -14
  133. package/src/lib/services/{aws/certificate-manager → certificate-manager}/types.ts +2 -2
  134. package/src/lib/services/{aws/cloudfront → cloudfront}/main.ts +89 -75
  135. package/src/lib/services/{aws/cloudfront → cloudfront}/types.ts +7 -4
  136. package/src/lib/services/{aws/cloudtrail → cloudtrail}/main.ts +12 -12
  137. package/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.ts +2 -2
  138. package/src/lib/services/{aws/cloudwatch → cloudwatch}/main.ts +2 -2
  139. package/src/lib/services/{aws/cloudwatch → cloudwatch}/types.ts +1 -1
  140. package/src/lib/services/{aws/codebuild → codebuild}/main.ts +8 -8
  141. package/src/lib/services/{aws/dynamodb → dynamodb}/main.ts +9 -9
  142. package/src/lib/services/{aws/dynamodb → dynamodb}/types.ts +1 -1
  143. package/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/main.ts +5 -5
  144. package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.ts +49 -38
  145. package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.ts +4 -4
  146. package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.ts +17 -17
  147. package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.ts +12 -12
  148. package/src/lib/services/{aws/elasticache → elasticache}/main.ts +11 -11
  149. package/src/lib/services/{aws/eventbridge → eventbridge}/main.ts +38 -38
  150. package/src/lib/services/{aws/eventbridge → eventbridge}/target.ts +15 -15
  151. package/src/lib/services/{aws/eventbridge → eventbridge}/types.ts +1 -1
  152. package/src/lib/services/{aws/evidently → evidently}/main.ts +19 -19
  153. package/src/lib/services/{aws/identity-access-management → identity-access-management}/main.ts +143 -135
  154. package/src/lib/services/index.ts +28 -1
  155. package/src/lib/services/{aws/key-management-service → key-management-service}/main.ts +6 -6
  156. package/src/lib/services/{aws/lambda → lambda}/main.ts +66 -60
  157. package/src/lib/services/{aws/lambda → lambda}/types.ts +1 -1
  158. package/src/lib/services/{aws/route53 → route53}/main.ts +32 -32
  159. package/src/lib/services/{aws/secrets-manager → secrets-manager}/main.ts +12 -16
  160. package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.ts +14 -14
  161. package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.ts +19 -19
  162. package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.ts +1 -1
  163. package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.ts +40 -40
  164. package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.ts +1 -1
  165. package/src/lib/services/{aws/step-function → step-function}/main.ts +78 -66
  166. package/src/lib/services/{aws/systems-manager → systems-manager}/main.ts +18 -13
  167. package/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/main.ts +17 -17
  168. package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.ts +9 -9
  169. package/src/lib/utils/aws/index.ts +8 -5
  170. package/dist/src/lib/services/aws/api-gateway/types.d.ts +0 -7
  171. package/dist/src/lib/services/aws/elastic-container-registry/main.js +0 -60
  172. package/dist/src/lib/services/aws/index.d.ts +0 -28
  173. package/dist/src/lib/services/aws/index.js +0 -44
  174. package/dist/src/lib/services/aws/virtual-private-cloud/main.js +0 -93
  175. package/src/lib/services/aws/api-gateway/types.ts +0 -8
  176. package/src/lib/services/aws/index.ts +0 -28
  177. /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/index.d.ts +0 -0
  178. /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/index.js +0 -0
  179. /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/types.js +0 -0
  180. /package/dist/src/lib/services/{aws/appconfig → appconfig}/constants.d.ts +0 -0
  181. /package/dist/src/lib/services/{aws/appconfig → appconfig}/constants.js +0 -0
  182. /package/dist/src/lib/services/{aws/appconfig → appconfig}/index.d.ts +0 -0
  183. /package/dist/src/lib/services/{aws/appconfig → appconfig}/index.js +0 -0
  184. /package/dist/src/lib/services/{aws/appconfig → appconfig}/types.d.ts +0 -0
  185. /package/dist/src/lib/services/{aws/appconfig → appconfig}/types.js +0 -0
  186. /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/index.d.ts +0 -0
  187. /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/index.js +0 -0
  188. /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/types.js +0 -0
  189. /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/index.d.ts +0 -0
  190. /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/index.js +0 -0
  191. /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/types.js +0 -0
  192. /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/index.d.ts +0 -0
  193. /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/index.js +0 -0
  194. /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/types.d.ts +0 -0
  195. /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/types.js +0 -0
  196. /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/index.d.ts +0 -0
  197. /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/index.js +0 -0
  198. /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/types.js +0 -0
  199. /package/dist/src/lib/services/{aws/codebuild → codebuild}/index.d.ts +0 -0
  200. /package/dist/src/lib/services/{aws/codebuild → codebuild}/index.js +0 -0
  201. /package/dist/src/lib/services/{aws/constants.d.ts → constants.d.ts} +0 -0
  202. /package/dist/src/lib/services/{aws/constants.js → constants.js} +0 -0
  203. /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/index.d.ts +0 -0
  204. /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/index.js +0 -0
  205. /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/types.js +0 -0
  206. /package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.d.ts +0 -0
  207. /package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.js +0 -0
  208. /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.d.ts +0 -0
  209. /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.js +0 -0
  210. /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.js +0 -0
  211. /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.d.ts +0 -0
  212. /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.js +0 -0
  213. /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.d.ts +0 -0
  214. /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.js +0 -0
  215. /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.d.ts +0 -0
  216. /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.js +0 -0
  217. /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.d.ts +0 -0
  218. /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.js +0 -0
  219. /package/dist/src/lib/services/{aws/elasticache → elasticache}/index.d.ts +0 -0
  220. /package/dist/src/lib/services/{aws/elasticache → elasticache}/index.js +0 -0
  221. /package/dist/src/lib/services/{aws/elasticache → elasticache}/types.d.ts +0 -0
  222. /package/dist/src/lib/services/{aws/elasticache → elasticache}/types.js +0 -0
  223. /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/index.d.ts +0 -0
  224. /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/index.js +0 -0
  225. /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/types.js +0 -0
  226. /package/dist/src/lib/services/{aws/evidently → evidently}/index.d.ts +0 -0
  227. /package/dist/src/lib/services/{aws/evidently → evidently}/index.js +0 -0
  228. /package/dist/src/lib/services/{aws/evidently → evidently}/types.d.ts +0 -0
  229. /package/dist/src/lib/services/{aws/evidently → evidently}/types.js +0 -0
  230. /package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/index.d.ts +0 -0
  231. /package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/index.js +0 -0
  232. /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/index.d.ts +0 -0
  233. /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/index.js +0 -0
  234. /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/types.d.ts +0 -0
  235. /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/types.js +0 -0
  236. /package/dist/src/lib/services/{aws/lambda → lambda}/index.d.ts +0 -0
  237. /package/dist/src/lib/services/{aws/lambda → lambda}/index.js +0 -0
  238. /package/dist/src/lib/services/{aws/lambda → lambda}/types.js +0 -0
  239. /package/dist/src/lib/services/{aws/route53 → route53}/index.d.ts +0 -0
  240. /package/dist/src/lib/services/{aws/route53 → route53}/index.js +0 -0
  241. /package/dist/src/lib/services/{aws/route53 → route53}/types.d.ts +0 -0
  242. /package/dist/src/lib/services/{aws/route53 → route53}/types.js +0 -0
  243. /package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/index.d.ts +0 -0
  244. /package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/index.js +0 -0
  245. /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.d.ts +0 -0
  246. /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.js +0 -0
  247. /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.d.ts +0 -0
  248. /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.js +0 -0
  249. /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.d.ts +0 -0
  250. /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.js +0 -0
  251. /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.js +0 -0
  252. /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.d.ts +0 -0
  253. /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.js +0 -0
  254. /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.js +0 -0
  255. /package/dist/src/lib/services/{aws/step-function → step-function}/index.d.ts +0 -0
  256. /package/dist/src/lib/services/{aws/step-function → step-function}/index.js +0 -0
  257. /package/dist/src/lib/services/{aws/step-function → step-function}/types.d.ts +0 -0
  258. /package/dist/src/lib/services/{aws/step-function → step-function}/types.js +0 -0
  259. /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/index.d.ts +0 -0
  260. /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/index.js +0 -0
  261. /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/types.d.ts +0 -0
  262. /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/types.js +0 -0
  263. /package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.d.ts +0 -0
  264. /package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.js +0 -0
  265. /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.d.ts +0 -0
  266. /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.js +0 -0
  267. /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.d.ts +0 -0
  268. /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.js +0 -0
  269. /package/src/lib/services/{aws/api-gateway → api-gateway}/index.ts +0 -0
  270. /package/src/lib/services/{aws/appconfig → appconfig}/constants.ts +0 -0
  271. /package/src/lib/services/{aws/appconfig → appconfig}/index.ts +0 -0
  272. /package/src/lib/services/{aws/appconfig → appconfig}/types.ts +0 -0
  273. /package/src/lib/services/{aws/certificate-manager → certificate-manager}/index.ts +0 -0
  274. /package/src/lib/services/{aws/cloudfront → cloudfront}/index.ts +0 -0
  275. /package/src/lib/services/{aws/cloudtrail → cloudtrail}/index.ts +0 -0
  276. /package/src/lib/services/{aws/cloudtrail → cloudtrail}/types.ts +0 -0
  277. /package/src/lib/services/{aws/cloudwatch → cloudwatch}/index.ts +0 -0
  278. /package/src/lib/services/{aws/codebuild → codebuild}/index.ts +0 -0
  279. /package/src/lib/services/{aws/constants.ts → constants.ts} +0 -0
  280. /package/src/lib/services/{aws/dynamodb → dynamodb}/index.ts +0 -0
  281. /package/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.ts +0 -0
  282. /package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.ts +0 -0
  283. /package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.ts +0 -0
  284. /package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.ts +0 -0
  285. /package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.ts +0 -0
  286. /package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.ts +0 -0
  287. /package/src/lib/services/{aws/elasticache → elasticache}/index.ts +0 -0
  288. /package/src/lib/services/{aws/elasticache → elasticache}/types.ts +0 -0
  289. /package/src/lib/services/{aws/eventbridge → eventbridge}/index.ts +0 -0
  290. /package/src/lib/services/{aws/evidently → evidently}/index.ts +0 -0
  291. /package/src/lib/services/{aws/evidently → evidently}/types.ts +0 -0
  292. /package/src/lib/services/{aws/identity-access-management → identity-access-management}/index.ts +0 -0
  293. /package/src/lib/services/{aws/key-management-service → key-management-service}/index.ts +0 -0
  294. /package/src/lib/services/{aws/key-management-service → key-management-service}/types.ts +0 -0
  295. /package/src/lib/services/{aws/lambda → lambda}/index.ts +0 -0
  296. /package/src/lib/services/{aws/route53 → route53}/index.ts +0 -0
  297. /package/src/lib/services/{aws/route53 → route53}/types.ts +0 -0
  298. /package/src/lib/services/{aws/secrets-manager → secrets-manager}/index.ts +0 -0
  299. /package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.ts +0 -0
  300. /package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.ts +0 -0
  301. /package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.ts +0 -0
  302. /package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.ts +0 -0
  303. /package/src/lib/services/{aws/step-function → step-function}/index.ts +0 -0
  304. /package/src/lib/services/{aws/step-function → step-function}/types.ts +0 -0
  305. /package/src/lib/services/{aws/systems-manager → systems-manager}/index.ts +0 -0
  306. /package/src/lib/services/{aws/systems-manager → systems-manager}/types.ts +0 -0
  307. /package/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.ts +0 -0
  308. /package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.ts +0 -0
  309. /package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.ts +0 -0
@@ -1,5 +1,5 @@
1
- import * as kms from 'aws-cdk-lib/aws-kms';
2
- import { CommonConstruct } from '../../../common';
1
+ import { Key } from 'aws-cdk-lib/aws-kms';
2
+ import { CommonConstruct } from '../../common';
3
3
  import { KmsKeyProps } from './types';
4
4
  /**
5
5
  * @classdesc Provides operations on AWS KMS.
@@ -24,5 +24,5 @@ export declare class KmsManager {
24
24
  * @param scope scope in which this resource is defined
25
25
  * @param props KMS key props
26
26
  */
27
- createKey(id: string, scope: CommonConstruct, props: KmsKeyProps): kms.Key;
27
+ createKey(id: string, scope: CommonConstruct, props: KmsKeyProps): Key;
28
28
  }
@@ -1,31 +1,8 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.KmsManager = void 0;
27
- const kms = __importStar(require("aws-cdk-lib/aws-kms"));
28
- const utils = __importStar(require("../../../utils"));
4
+ const aws_kms_1 = require("aws-cdk-lib/aws-kms");
5
+ const utils_1 = require("../../utils");
29
6
  /**
30
7
  * @classdesc Provides operations on AWS KMS.
31
8
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
@@ -52,7 +29,7 @@ class KmsManager {
52
29
  createKey(id, scope, props) {
53
30
  if (!props)
54
31
  throw `KMS Key props undefined for ${id}`;
55
- const key = new kms.Key(scope, `${id}`, {
32
+ const key = new aws_kms_1.Key(scope, `${id}`, {
56
33
  admins: props.admins,
57
34
  alias: `${props.alias}-${scope.props.stage}`,
58
35
  description: props.description,
@@ -64,8 +41,8 @@ class KmsManager {
64
41
  policy: props.policy,
65
42
  removalPolicy: props.removalPolicy,
66
43
  });
67
- utils.createCfnOutput(`${id}-keyId`, scope, key.keyId);
68
- utils.createCfnOutput(`${id}-keyArn`, scope, key.keyArn);
44
+ (0, utils_1.createCfnOutput)(`${id}-keyId`, scope, key.keyId);
45
+ (0, utils_1.createCfnOutput)(`${id}-keyArn`, scope, key.keyArn);
69
46
  return key;
70
47
  }
71
48
  }
@@ -1,20 +1,18 @@
1
- import * as cdk from 'aws-cdk-lib';
2
- import * as ec2 from 'aws-cdk-lib/aws-ec2';
3
- import * as efs from 'aws-cdk-lib/aws-efs';
4
- import * as iam from 'aws-cdk-lib/aws-iam';
5
- import * as lambda from 'aws-cdk-lib/aws-lambda';
6
- import { IVersion } from 'aws-cdk-lib/aws-lambda';
7
- import { CommonConstruct } from '../../../common';
1
+ import { ISecurityGroup, IVpc, SubnetSelection } from 'aws-cdk-lib/aws-ec2';
2
+ import { IAccessPoint } from 'aws-cdk-lib/aws-efs';
3
+ import { CfnRole, Role } from 'aws-cdk-lib/aws-iam';
4
+ import { Alias, AssetCode, DockerImageCode, DockerImageFunction, Function, ILayerVersion, IVersion, LayerVersion } from 'aws-cdk-lib/aws-lambda';
5
+ import { CommonConstruct } from '../../common';
8
6
  import { LambdaAliasProps, LambdaEdgeProps, LambdaProps } from './types';
9
7
  /**
10
- * @classdesc Provides operations on AWS Lambda.
8
+ * @classdesc Provides operations on AWS Lambda
11
9
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
12
10
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
13
11
  * @example
14
12
  * import { CommonConstruct } from '@gradientedge/cdk-utils'
15
13
  *
16
14
  * class CustomConstruct extends CommonConstruct {
17
- * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
15
+ * constructor(parent: Construct, id: string, props: common.CommonStackProps) {
18
16
  * super(parent, id, props)
19
17
  * this.props = props
20
18
  * this.lambdaManager.createLambdaFunction('MyFunction', this, role, layers, code)
@@ -29,7 +27,7 @@ export declare class LambdaManager {
29
27
  * @param scope scope in which this resource is defined
30
28
  * @param code
31
29
  */
32
- createLambdaLayer(id: string, scope: CommonConstruct, code: lambda.AssetCode): cdk.aws_lambda.LayerVersion;
30
+ createLambdaLayer(id: string, scope: CommonConstruct, code: AssetCode): LayerVersion;
33
31
  /**
34
32
  * @summary Method to create a lambda function (nodejs)
35
33
  * @param id scoped id of the resource
@@ -46,7 +44,7 @@ export declare class LambdaManager {
46
44
  * @param mountPath
47
45
  * @param vpcSubnets
48
46
  */
49
- createLambdaFunction(id: string, scope: CommonConstruct, props: LambdaProps, role: iam.Role | iam.CfnRole, layers: lambda.ILayerVersion[], code: lambda.AssetCode, handler?: string, environment?: any, vpc?: ec2.IVpc, securityGroups?: ec2.ISecurityGroup[], accessPoint?: efs.IAccessPoint, mountPath?: string, vpcSubnets?: ec2.SubnetSelection): cdk.aws_lambda.Function;
47
+ createLambdaFunction(id: string, scope: CommonConstruct, props: LambdaProps, role: Role | CfnRole, layers: ILayerVersion[], code: AssetCode, handler?: string, environment?: any, vpc?: IVpc, securityGroups?: ISecurityGroup[], accessPoint?: IAccessPoint, mountPath?: string, vpcSubnets?: SubnetSelection): Function;
50
48
  /**
51
49
  * @summary Method to provision a Lambda@Edge function
52
50
  * @param id scoped id of the resource
@@ -61,7 +59,7 @@ export declare class LambdaManager {
61
59
  * @param accessPoint
62
60
  * @param mountPath
63
61
  */
64
- createEdgeFunction(id: string, scope: CommonConstruct, props: LambdaEdgeProps, layers: lambda.ILayerVersion[], code: lambda.AssetCode, role: iam.Role, environment?: any, vpc?: ec2.IVpc, securityGroups?: ec2.ISecurityGroup[], accessPoint?: efs.IAccessPoint, mountPath?: string): cdk.aws_cloudfront.experimental.EdgeFunction;
62
+ createEdgeFunction(id: string, scope: CommonConstruct, props: LambdaEdgeProps, layers: ILayerVersion[], code: AssetCode, role: Role, environment?: any, vpc?: IVpc, securityGroups?: ISecurityGroup[], accessPoint?: IAccessPoint, mountPath?: string): import("aws-cdk-lib/aws-cloudfront/lib/experimental").EdgeFunction;
65
63
  /**
66
64
  * @summary Method to create a lambda function (nodejs) with docker image
67
65
  * @param id scoped id of the resource
@@ -76,7 +74,7 @@ export declare class LambdaManager {
76
74
  * @param mountPath
77
75
  * @param vpcSubnets
78
76
  */
79
- createLambdaDockerFunction(id: string, scope: CommonConstruct, props: LambdaProps, role: iam.Role | iam.CfnRole, code: lambda.DockerImageCode, environment?: any, vpc?: ec2.IVpc, securityGroups?: ec2.ISecurityGroup[], accessPoint?: efs.IAccessPoint, mountPath?: string, vpcSubnets?: ec2.SubnetSelection): cdk.aws_lambda.DockerImageFunction;
77
+ createLambdaDockerFunction(id: string, scope: CommonConstruct, props: LambdaProps, role: Role | CfnRole, code: DockerImageCode, environment?: any, vpc?: IVpc, securityGroups?: ISecurityGroup[], accessPoint?: IAccessPoint, mountPath?: string, vpcSubnets?: SubnetSelection): DockerImageFunction;
80
78
  /**
81
79
  * @summary Method to create a lambda function Alias
82
80
  * @param id scoped id of the resource
@@ -84,5 +82,5 @@ export declare class LambdaManager {
84
82
  * @param props
85
83
  * @param lambdaVersion
86
84
  */
87
- createLambdaFunctionAlias(id: string, scope: CommonConstruct, props: LambdaAliasProps, lambdaVersion: IVersion): cdk.aws_lambda.Alias;
85
+ createLambdaFunctionAlias(id: string, scope: CommonConstruct, props: LambdaAliasProps, lambdaVersion: IVersion): Alias;
88
86
  }
@@ -1,46 +1,23 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.LambdaManager = void 0;
27
- const cdk = __importStar(require("aws-cdk-lib"));
28
- const iam = __importStar(require("aws-cdk-lib/aws-iam"));
29
- const lambda = __importStar(require("aws-cdk-lib/aws-lambda"));
30
- const eventSources = __importStar(require("aws-cdk-lib/aws-lambda-event-sources"));
31
- const utils = __importStar(require("../../../utils"));
32
- const common_1 = require("../../../common");
4
+ const aws_cdk_lib_1 = require("aws-cdk-lib");
5
+ const aws_iam_1 = require("aws-cdk-lib/aws-iam");
6
+ const aws_lambda_1 = require("aws-cdk-lib/aws-lambda");
7
+ const aws_lambda_event_sources_1 = require("aws-cdk-lib/aws-lambda-event-sources");
8
+ const common_1 = require("../../common");
9
+ const utils_1 = require("../../utils");
33
10
  const cloudfront_1 = require("../cloudfront");
34
11
  const systems_manager_1 = require("../systems-manager");
35
12
  /**
36
- * @classdesc Provides operations on AWS Lambda.
13
+ * @classdesc Provides operations on AWS Lambda
37
14
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
38
15
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
39
16
  * @example
40
17
  * import { CommonConstruct } from '@gradientedge/cdk-utils'
41
18
  *
42
19
  * class CustomConstruct extends CommonConstruct {
43
- * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
20
+ * constructor(parent: Construct, id: string, props: common.CommonStackProps) {
44
21
  * super(parent, id, props)
45
22
  * this.props = props
46
23
  * this.lambdaManager.createLambdaFunction('MyFunction', this, role, layers, code)
@@ -56,13 +33,13 @@ class LambdaManager {
56
33
  * @param code
57
34
  */
58
35
  createLambdaLayer(id, scope, code) {
59
- const lambdaLayer = new lambda.LayerVersion(scope, `${id}`, {
36
+ const lambdaLayer = new aws_lambda_1.LayerVersion(scope, `${id}`, {
60
37
  code: code,
61
38
  compatibleRuntimes: [scope.props.nodejsRuntime ?? common_1.CommonStack.NODEJS_RUNTIME],
62
39
  description: `${id}`,
63
40
  layerVersionName: `${id}-${scope.props.stage}`,
64
41
  });
65
- utils.createCfnOutput(`${id}-lambdaLayerArn`, scope, lambdaLayer.layerVersionArn);
42
+ (0, utils_1.createCfnOutput)(`${id}-lambdaLayerArn`, scope, lambdaLayer.layerVersionArn);
66
43
  return lambdaLayer;
67
44
  }
68
45
  /**
@@ -90,11 +67,11 @@ class LambdaManager {
90
67
  const redriveQueue = scope.sqsManager.createRedriveQueueForLambda(`${id}-rdq`, scope, props);
91
68
  deadLetterQueue = scope.sqsManager.createDeadLetterQueueForLambda(`${id}-dlq`, scope, props, redriveQueue);
92
69
  }
93
- const lambdaFunction = new lambda.Function(scope, `${id}`, {
70
+ const lambdaFunction = new aws_lambda_1.Function(scope, `${id}`, {
94
71
  ...props,
95
72
  ...{
96
73
  allowPublicSubnet: !!vpc,
97
- architecture: props.architecture ?? lambda.Architecture.ARM_64,
74
+ architecture: props.architecture ?? aws_lambda_1.Architecture.ARM_64,
98
75
  code: code,
99
76
  deadLetterQueue: deadLetterQueue,
100
77
  environment: {
@@ -105,26 +82,24 @@ class LambdaManager {
105
82
  STAGE: scope.props.stage,
106
83
  ...environment,
107
84
  },
108
- filesystem: accessPoint
109
- ? lambda.FileSystem.fromEfsAccessPoint(accessPoint, mountPath || '/mnt/msg')
110
- : undefined,
85
+ filesystem: accessPoint ? aws_lambda_1.FileSystem.fromEfsAccessPoint(accessPoint, mountPath || '/mnt/msg') : undefined,
111
86
  functionName: functionName,
112
87
  handler: handler || 'index.lambda_handler',
113
88
  insightsVersion: props.insightsVersion,
114
89
  layers: layers,
115
90
  logRetention: scope.props.logRetention ?? props.logRetention,
116
91
  reservedConcurrentExecutions: props.reservedConcurrentExecutions ?? scope.props.defaultReservedLambdaConcurrentExecutions,
117
- role: role instanceof iam.Role ? role : undefined,
92
+ role: role instanceof aws_iam_1.Role ? role : undefined,
118
93
  runtime: props.runtime ?? scope.props.nodejsRuntime ?? common_1.CommonStack.NODEJS_RUNTIME,
119
94
  securityGroups: securityGroups,
120
- timeout: props.timeoutInSecs ? cdk.Duration.seconds(props.timeoutInSecs) : cdk.Duration.minutes(15),
95
+ timeout: props.timeoutInSecs ? aws_cdk_lib_1.Duration.seconds(props.timeoutInSecs) : aws_cdk_lib_1.Duration.minutes(15),
121
96
  tracing: scope.props.defaultTracing ?? props.tracing,
122
97
  vpc,
123
98
  vpcSubnets,
124
99
  },
125
100
  });
126
101
  if (lambdaFunction.deadLetterQueue && props.dlq?.retriesEnabled) {
127
- lambdaFunction.addEventSource(new eventSources.SqsEventSource(lambdaFunction.deadLetterQueue, {
102
+ lambdaFunction.addEventSource(new aws_lambda_event_sources_1.SqsEventSource(lambdaFunction.deadLetterQueue, {
128
103
  batchSize: props.dlq.retryBatchSize ?? 1,
129
104
  reportBatchItemFailures: true,
130
105
  }));
@@ -133,8 +108,8 @@ class LambdaManager {
133
108
  props.lambdaAliases.forEach(alias => {
134
109
  const aliasId = alias.id ?? `${id}-${alias.aliasName}`;
135
110
  const functionAlias = this.createLambdaFunctionAlias(`${aliasId}`, scope, alias, lambdaFunction.currentVersion);
136
- utils.createCfnOutput(`${id}-${alias.aliasName}AliasArn`, scope, functionAlias.functionArn);
137
- utils.createCfnOutput(`${id}-${alias.aliasName}AliasName`, scope, functionAlias.aliasName);
111
+ (0, utils_1.createCfnOutput)(`${id}-${alias.aliasName}AliasArn`, scope, functionAlias.functionArn);
112
+ (0, utils_1.createCfnOutput)(`${id}-${alias.aliasName}AliasName`, scope, functionAlias.aliasName);
138
113
  if (alias.provisionedConcurrency) {
139
114
  const functionAutoScaling = functionAlias.addAutoScaling(alias.provisionedConcurrency);
140
115
  functionAutoScaling.scaleOnUtilization({
@@ -145,11 +120,11 @@ class LambdaManager {
145
120
  }
146
121
  if (props.tags && props.tags.length > 0) {
147
122
  props.tags.forEach(tag => {
148
- cdk.Tags.of(lambdaFunction).add(tag.key, tag.value);
123
+ aws_cdk_lib_1.Tags.of(lambdaFunction).add(tag.key, tag.value);
149
124
  });
150
125
  }
151
- utils.createCfnOutput(`${id}-lambdaArn`, scope, lambdaFunction.functionArn);
152
- utils.createCfnOutput(`${id}-lambdaName`, scope, lambdaFunction.functionName);
126
+ (0, utils_1.createCfnOutput)(`${id}-lambdaArn`, scope, lambdaFunction.functionArn);
127
+ (0, utils_1.createCfnOutput)(`${id}-lambdaName`, scope, lambdaFunction.functionName);
153
128
  return lambdaFunction;
154
129
  }
155
130
  /**
@@ -192,11 +167,11 @@ class LambdaManager {
192
167
  const redriveQueue = scope.sqsManager.createRedriveQueueForLambda(`${id}-rdq`, scope, props);
193
168
  deadLetterQueue = scope.sqsManager.createDeadLetterQueueForLambda(`${id}-dlq`, scope, props, redriveQueue);
194
169
  }
195
- const lambdaFunction = new lambda.DockerImageFunction(scope, `${id}`, {
170
+ const lambdaFunction = new aws_lambda_1.DockerImageFunction(scope, `${id}`, {
196
171
  ...props,
197
172
  ...{
198
173
  allowPublicSubnet: !!vpc,
199
- architecture: props.architecture ?? lambda.Architecture.ARM_64,
174
+ architecture: props.architecture ?? aws_lambda_1.Architecture.ARM_64,
200
175
  code: code,
201
176
  deadLetterQueue: deadLetterQueue,
202
177
  environment: {
@@ -207,30 +182,28 @@ class LambdaManager {
207
182
  STAGE: scope.props.stage,
208
183
  ...environment,
209
184
  },
210
- filesystem: accessPoint
211
- ? lambda.FileSystem.fromEfsAccessPoint(accessPoint, mountPath || '/mnt/msg')
212
- : undefined,
185
+ filesystem: accessPoint ? aws_lambda_1.FileSystem.fromEfsAccessPoint(accessPoint, mountPath || '/mnt/msg') : undefined,
213
186
  functionName: functionName,
214
187
  insightsVersion: props.insightsVersion,
215
188
  logRetention: scope.props.logRetention ?? props.logRetention,
216
189
  reservedConcurrentExecutions: props.reservedConcurrentExecutions,
217
- role: role instanceof iam.Role ? role : undefined,
190
+ role: role instanceof aws_iam_1.Role ? role : undefined,
218
191
  runtime: props.runtime ?? scope.props.nodejsRuntime ?? common_1.CommonStack.NODEJS_RUNTIME,
219
192
  securityGroups: securityGroups,
220
- timeout: props.timeoutInSecs ? cdk.Duration.seconds(props.timeoutInSecs) : cdk.Duration.minutes(1),
193
+ timeout: props.timeoutInSecs ? aws_cdk_lib_1.Duration.seconds(props.timeoutInSecs) : aws_cdk_lib_1.Duration.minutes(1),
221
194
  tracing: props.tracing,
222
195
  vpc,
223
196
  vpcSubnets,
224
197
  },
225
198
  });
226
199
  if (lambdaFunction.deadLetterQueue && props.dlq?.retriesEnabled) {
227
- lambdaFunction.addEventSource(new eventSources.SqsEventSource(lambdaFunction.deadLetterQueue, {
200
+ lambdaFunction.addEventSource(new aws_lambda_event_sources_1.SqsEventSource(lambdaFunction.deadLetterQueue, {
228
201
  batchSize: props.dlq.retryBatchSize ?? 1,
229
202
  reportBatchItemFailures: true,
230
203
  }));
231
204
  }
232
- utils.createCfnOutput(`${id}-lambdaArn`, scope, lambdaFunction.functionArn);
233
- utils.createCfnOutput(`${id}-lambdaName`, scope, lambdaFunction.functionName);
205
+ (0, utils_1.createCfnOutput)(`${id}-lambdaArn`, scope, lambdaFunction.functionArn);
206
+ (0, utils_1.createCfnOutput)(`${id}-lambdaName`, scope, lambdaFunction.functionName);
234
207
  return lambdaFunction;
235
208
  }
236
209
  /**
@@ -243,7 +216,7 @@ class LambdaManager {
243
216
  createLambdaFunctionAlias(id, scope, props, lambdaVersion) {
244
217
  if (!props)
245
218
  throw `Lambda Alias props undefined for ${id}`;
246
- const lambdaFunctionAlias = new lambda.Alias(scope, `${id}`, {
219
+ const lambdaFunctionAlias = new aws_lambda_1.Alias(scope, `${id}`, {
247
220
  ...props,
248
221
  ...{
249
222
  additionalVersions: props.additionalVersions,
@@ -257,8 +230,8 @@ class LambdaManager {
257
230
  version: lambdaVersion,
258
231
  },
259
232
  });
260
- utils.createCfnOutput(`${id}-lambdaAliasName`, scope, lambdaFunctionAlias.functionArn);
261
- utils.createCfnOutput(`${id}-lambdaAliasArn`, scope, lambdaFunctionAlias.functionName);
233
+ (0, utils_1.createCfnOutput)(`${id}-lambdaAliasName`, scope, lambdaFunctionAlias.functionArn);
234
+ (0, utils_1.createCfnOutput)(`${id}-lambdaAliasArn`, scope, lambdaFunctionAlias.functionName);
262
235
  return lambdaFunctionAlias;
263
236
  }
264
237
  }
@@ -1,5 +1,5 @@
1
1
  import { AliasProps, FunctionProps } from 'aws-cdk-lib/aws-lambda';
2
- import { TagProps } from '../../../types';
2
+ import { TagProps } from '../../types';
3
3
  import { EdgeFunctionProps } from 'aws-cdk-lib/aws-cloudfront/lib/experimental';
4
4
  import { QueueProps } from '../simple-queue-service';
5
5
  /**
@@ -1,10 +1,10 @@
1
- import * as apig from 'aws-cdk-lib/aws-apigateway';
2
- import * as cloudfront from 'aws-cdk-lib/aws-cloudfront';
3
- import * as route53 from 'aws-cdk-lib/aws-route53';
4
- import { CommonConstruct } from '../../../common';
1
+ import { DomainName } from 'aws-cdk-lib/aws-apigateway';
2
+ import { IDistribution } from 'aws-cdk-lib/aws-cloudfront';
3
+ import { ARecord, IHostedZone } from 'aws-cdk-lib/aws-route53';
4
+ import { CommonConstruct } from '../../common';
5
5
  import { Route53Props } from './types';
6
6
  /**
7
- * @classdesc Provides operations on AWS Route53.
7
+ * @classdesc Provides operations on AWS Route53
8
8
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
9
9
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
10
10
  * @example
@@ -26,14 +26,14 @@ export declare class Route53Manager {
26
26
  * @param scope scope in which this resource is defined
27
27
  * @param props
28
28
  */
29
- createHostedZone(id: string, scope: CommonConstruct, props: Route53Props): route53.IHostedZone;
29
+ createHostedZone(id: string, scope: CommonConstruct, props: Route53Props): IHostedZone;
30
30
  /**
31
31
  * @summary Method to create/lookup a hosted zone
32
32
  * @param id scoped id of the resource
33
33
  * @param scope scope in which this resource is defined
34
34
  * @param useExistingHostedZone Flag to indicate whether to lookup vs create new hosted zone
35
35
  */
36
- withHostedZoneFromFullyQualifiedDomainName(id: string, scope: CommonConstruct, useExistingHostedZone: boolean): route53.IHostedZone;
36
+ withHostedZoneFromFullyQualifiedDomainName(id: string, scope: CommonConstruct, useExistingHostedZone: boolean): IHostedZone;
37
37
  /**
38
38
  * @summary Method to create a-record for cloudfront target
39
39
  * @param id scoped id of the resource
@@ -43,7 +43,7 @@ export declare class Route53Manager {
43
43
  * @param recordName
44
44
  * @param skipStageFromRecord
45
45
  */
46
- createCloudFrontTargetARecord(id: string, scope: CommonConstruct, distribution?: cloudfront.IDistribution, hostedZone?: route53.IHostedZone, recordName?: string, skipStageFromRecord?: boolean): route53.ARecord;
46
+ createCloudFrontTargetARecord(id: string, scope: CommonConstruct, distribution?: IDistribution, hostedZone?: IHostedZone, recordName?: string, skipStageFromRecord?: boolean): ARecord;
47
47
  /**
48
48
  * @summary Method to create a-record for cloudfront target
49
49
  * @param id scoped id of the resource
@@ -52,7 +52,7 @@ export declare class Route53Manager {
52
52
  * @param hostedZone
53
53
  * @param recordName
54
54
  */
55
- createCloudFrontTargetARecordV2(id: string, scope: CommonConstruct, distribution?: cloudfront.IDistribution, hostedZone?: route53.IHostedZone, recordName?: string): route53.ARecord;
55
+ createCloudFrontTargetARecordV2(id: string, scope: CommonConstruct, distribution?: IDistribution, hostedZone?: IHostedZone, recordName?: string): ARecord;
56
56
  /**
57
57
  * @summary Method to create a-record for restApi gateway target
58
58
  * @param id scoped id of the resource
@@ -62,5 +62,5 @@ export declare class Route53Manager {
62
62
  * @param hostedZone
63
63
  * @param skipStageFromRecord
64
64
  */
65
- createApiGatewayARecord(id: string, scope: CommonConstruct, recordName: string, apiDomain: apig.DomainName, hostedZone: route53.IHostedZone, skipStageFromRecord?: boolean): route53.ARecord;
65
+ createApiGatewayARecord(id: string, scope: CommonConstruct, recordName: string, apiDomain: DomainName, hostedZone: IHostedZone, skipStageFromRecord?: boolean): ARecord;
66
66
  }
@@ -1,34 +1,11 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.Route53Manager = void 0;
27
- const route53 = __importStar(require("aws-cdk-lib/aws-route53"));
28
- const route53Targets = __importStar(require("aws-cdk-lib/aws-route53-targets"));
29
- const utils = __importStar(require("../../../utils"));
4
+ const aws_route53_1 = require("aws-cdk-lib/aws-route53");
5
+ const aws_route53_targets_1 = require("aws-cdk-lib/aws-route53-targets");
6
+ const utils_1 = require("../../utils");
30
7
  /**
31
- * @classdesc Provides operations on AWS Route53.
8
+ * @classdesc Provides operations on AWS Route53
32
9
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
33
10
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
34
11
  * @example
@@ -55,18 +32,18 @@ class Route53Manager {
55
32
  if (!props)
56
33
  throw `Route53 props undefined for ${id}`;
57
34
  if (props.useExistingHostedZone) {
58
- hostedZone = route53.HostedZone.fromLookup(scope, `${id}`, {
35
+ hostedZone = aws_route53_1.HostedZone.fromLookup(scope, `${id}`, {
59
36
  domainName: scope.props.domainName,
60
37
  });
61
38
  }
62
39
  else {
63
- hostedZone = new route53.HostedZone(scope, `${id}`, {
40
+ hostedZone = new aws_route53_1.HostedZone(scope, `${id}`, {
64
41
  comment: `Hosted zone for ${scope.props.domainName}`,
65
42
  zoneName: scope.props.domainName,
66
43
  });
67
44
  }
68
- utils.createCfnOutput(`${id}-hostedZoneId`, scope, hostedZone.hostedZoneId);
69
- utils.createCfnOutput(`${id}-hostedZoneArn`, scope, hostedZone.hostedZoneArn);
45
+ (0, utils_1.createCfnOutput)(`${id}-hostedZoneId`, scope, hostedZone.hostedZoneId);
46
+ (0, utils_1.createCfnOutput)(`${id}-hostedZoneArn`, scope, hostedZone.hostedZoneArn);
70
47
  return hostedZone;
71
48
  }
72
49
  /**
@@ -78,18 +55,18 @@ class Route53Manager {
78
55
  withHostedZoneFromFullyQualifiedDomainName(id, scope, useExistingHostedZone) {
79
56
  let hostedZone;
80
57
  if (useExistingHostedZone) {
81
- hostedZone = route53.HostedZone.fromLookup(scope, `${id}`, {
58
+ hostedZone = aws_route53_1.HostedZone.fromLookup(scope, `${id}`, {
82
59
  domainName: scope.fullyQualifiedDomainName,
83
60
  });
84
61
  }
85
62
  else {
86
- hostedZone = new route53.HostedZone(scope, `${id}`, {
63
+ hostedZone = new aws_route53_1.HostedZone(scope, `${id}`, {
87
64
  comment: `Hosted zone for ${scope.fullyQualifiedDomainName}`,
88
65
  zoneName: scope.fullyQualifiedDomainName,
89
66
  });
90
67
  }
91
- utils.createCfnOutput(`${id}-hostedZoneId`, scope, hostedZone.hostedZoneId);
92
- utils.createCfnOutput(`${id}-hostedZoneArn`, scope, hostedZone.hostedZoneArn);
68
+ (0, utils_1.createCfnOutput)(`${id}-hostedZoneId`, scope, hostedZone.hostedZoneId);
69
+ (0, utils_1.createCfnOutput)(`${id}-hostedZoneArn`, scope, hostedZone.hostedZoneArn);
93
70
  return hostedZone;
94
71
  }
95
72
  /**
@@ -106,14 +83,14 @@ class Route53Manager {
106
83
  throw `Distribution undefined for ${id}`;
107
84
  if (!hostedZone)
108
85
  throw `HostedZone undefined for ${id}`;
109
- const aRecord = new route53.ARecord(scope, `${id}`, {
86
+ const aRecord = new aws_route53_1.ARecord(scope, `${id}`, {
110
87
  recordName: (recordName && scope.isProductionStage()) || skipStageFromRecord
111
88
  ? `${recordName}`
112
89
  : `${recordName}-${scope.props.stage}`,
113
- target: route53.RecordTarget.fromAlias(new route53Targets.CloudFrontTarget(distribution)),
90
+ target: aws_route53_1.RecordTarget.fromAlias(new aws_route53_targets_1.CloudFrontTarget(distribution)),
114
91
  zone: hostedZone,
115
92
  });
116
- utils.createCfnOutput(`${id}-aRecordDomainName`, scope, aRecord.domainName);
93
+ (0, utils_1.createCfnOutput)(`${id}-aRecordDomainName`, scope, aRecord.domainName);
117
94
  return aRecord;
118
95
  }
119
96
  /**
@@ -129,12 +106,12 @@ class Route53Manager {
129
106
  throw `Distribution undefined for ${id}`;
130
107
  if (!hostedZone)
131
108
  throw `HostedZone undefined for ${id}`;
132
- const aRecord = new route53.ARecord(scope, `${id}`, {
109
+ const aRecord = new aws_route53_1.ARecord(scope, `${id}`, {
133
110
  recordName: recordName,
134
- target: route53.RecordTarget.fromAlias(new route53Targets.CloudFrontTarget(distribution)),
111
+ target: aws_route53_1.RecordTarget.fromAlias(new aws_route53_targets_1.CloudFrontTarget(distribution)),
135
112
  zone: hostedZone,
136
113
  });
137
- utils.createCfnOutput(`${id}-aRecordDomainName`, scope, aRecord.domainName);
114
+ (0, utils_1.createCfnOutput)(`${id}-aRecordDomainName`, scope, aRecord.domainName);
138
115
  return aRecord;
139
116
  }
140
117
  /**
@@ -151,12 +128,12 @@ class Route53Manager {
151
128
  if (recordName && recordName !== '')
152
129
  apiRecordName =
153
130
  scope.isProductionStage() || skipStageFromRecord ? `${recordName}` : `${recordName}-${scope.props.stage}`;
154
- const apiARecord = new route53.ARecord(scope, `${id}`, {
131
+ const apiARecord = new aws_route53_1.ARecord(scope, `${id}`, {
155
132
  recordName: apiRecordName,
156
- target: route53.RecordTarget.fromAlias(new route53Targets.ApiGatewayDomain(apiDomain)),
133
+ target: aws_route53_1.RecordTarget.fromAlias(new aws_route53_targets_1.ApiGatewayDomain(apiDomain)),
157
134
  zone: hostedZone,
158
135
  });
159
- utils.createCfnOutput(`${id}-a-record-domain-name`, scope, apiARecord.domainName);
136
+ (0, utils_1.createCfnOutput)(`${id}-a-record-domain-name`, scope, apiARecord.domainName);
160
137
  return apiARecord;
161
138
  }
162
139
  }
@@ -1,6 +1,5 @@
1
- import * as cdk from 'aws-cdk-lib';
2
- import * as secretsManager from 'aws-cdk-lib/aws-secretsmanager';
3
- import { CommonConstruct } from '../../../common';
1
+ import { Secret, SecretProps } from 'aws-cdk-lib/aws-secretsmanager';
2
+ import { CommonConstruct } from '../../common';
4
3
  /**
5
4
  * @classdesc Provides operations on AWS Secrets Manager.
6
5
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
@@ -9,10 +8,10 @@ import { CommonConstruct } from '../../../common';
9
8
  * import { CommonConstruct } from '@gradientedge/cdk-utils'
10
9
  *
11
10
  * class CustomConstruct extends CommonConstruct {
12
- * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
11
+ * constructor(parent: Construct, id: string, props: common.CommonStackProps) {
13
12
  * super(parent, id, props)
14
13
  * this.props = props
15
- * this.secretsManager.loadSecret('MySecretName', 'eu-west-1')
14
+ * this.loadSecret('MySecretName', 'eu-west-1')
16
15
  * }
17
16
  * }
18
17
  * @see [CDK Secrets Manager Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager-readme.html}
@@ -24,7 +23,7 @@ export declare class SecretsManager {
24
23
  * @param scope scope in which this resource is defined
25
24
  * @param props the secret properties
26
25
  */
27
- createSecret(id: string, scope: CommonConstruct, props: secretsManager.SecretProps): cdk.aws_secretsmanager.Secret;
26
+ createSecret(id: string, scope: CommonConstruct, props: SecretProps): Secret;
28
27
  /**
29
28
  * @summary Method to retrieve a secret from secrets manager with a cloudformation export
30
29
  * @param id
@@ -32,7 +31,7 @@ export declare class SecretsManager {
32
31
  * @param stackName
33
32
  * @param exportName
34
33
  */
35
- retrieveSecretFromSecretsManager(id: string, scope: CommonConstruct, stackName: string, exportName: string): cdk.aws_secretsmanager.ISecret;
34
+ retrieveSecretFromSecretsManager(id: string, scope: CommonConstruct, stackName: string, exportName: string): import("aws-cdk-lib/aws-secretsmanager").ISecret;
36
35
  /**
37
36
  * @summary Method to resolve secret value from a secret using AWS SDK
38
37
  * @param region the region in which the secret is defined