@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,32 +1,42 @@
1
- import * as apig from 'aws-cdk-lib/aws-apigateway'
2
- import * as acm from 'aws-cdk-lib/aws-certificatemanager'
3
- import * as iam from 'aws-cdk-lib/aws-iam'
4
- import * as lambda from 'aws-cdk-lib/aws-lambda'
5
- import * as route53 from 'aws-cdk-lib/aws-route53'
6
- import * as sns from 'aws-cdk-lib/aws-sns'
1
+ import {
2
+ BasePathMapping,
3
+ DomainName,
4
+ Integration,
5
+ IntegrationResponse,
6
+ Method,
7
+ MethodResponse,
8
+ Model,
9
+ Resource,
10
+ RestApi,
11
+ } from 'aws-cdk-lib/aws-apigateway'
12
+ import { ICertificate } from 'aws-cdk-lib/aws-certificatemanager'
13
+ import { Role } from 'aws-cdk-lib/aws-iam'
14
+ import { IFunction } from 'aws-cdk-lib/aws-lambda'
15
+ import { IHostedZone } from 'aws-cdk-lib/aws-route53'
16
+ import { Topic } from 'aws-cdk-lib/aws-sns'
7
17
  import { ApiToLambdaTargetRestApiType } from './types'
8
18
 
9
19
  /**
10
20
  * @classdesc Provides a construct to contain api resources for ApiToLambdaTarget
11
21
  */
12
22
  export class ApiToLambdaTargetRestApi implements ApiToLambdaTargetRestApiType {
13
- api: apig.RestApi
14
- basePathMappings: apig.BasePathMapping[] = []
15
- certificate: acm.ICertificate
16
- domain: apig.DomainName
17
- errorResponseModel: apig.Model
18
- hostedZone: route53.IHostedZone
19
- integration: apig.Integration
20
- integrationErrorResponse: apig.IntegrationResponse
23
+ api: RestApi
24
+ basePathMappings: BasePathMapping[] = []
25
+ certificate: ICertificate
26
+ domain: DomainName
27
+ errorResponseModel: Model
28
+ hostedZone: IHostedZone
29
+ integration: Integration
30
+ integrationErrorResponse: IntegrationResponse
21
31
  integrationRequestParameters: { [p: string]: string }
22
32
  integrationRequestTemplates: { [p: string]: string }
23
- integrationResponse: apig.IntegrationResponse
24
- lambda: lambda.IFunction
25
- method: apig.Method
26
- methodErrorResponse: apig.MethodResponse
27
- methodResponse: apig.MethodResponse
28
- resource: apig.Resource
29
- responseModel: apig.Model
30
- topic: sns.Topic
31
- role: iam.Role
33
+ integrationResponse: IntegrationResponse
34
+ lambda: IFunction
35
+ method: Method
36
+ methodErrorResponse: MethodResponse
37
+ methodResponse: MethodResponse
38
+ resource: Resource
39
+ responseModel: Model
40
+ topic: Topic
41
+ role: Role
32
42
  }
@@ -1,8 +1,14 @@
1
- import * as cdk from 'aws-cdk-lib'
2
- import * as apig from 'aws-cdk-lib/aws-apigateway'
3
- import * as iam from 'aws-cdk-lib/aws-iam'
4
- import * as lambda from 'aws-cdk-lib/aws-lambda'
5
- import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager'
1
+ import { Fn, RemovalPolicy } from 'aws-cdk-lib'
2
+ import {
3
+ BasePathMapping,
4
+ LambdaIntegration,
5
+ LogGroupLogDestination,
6
+ Resource,
7
+ RestApi,
8
+ } from 'aws-cdk-lib/aws-apigateway'
9
+ import { PolicyDocument, Role, ServicePrincipal } from 'aws-cdk-lib/aws-iam'
10
+ import { Function } from 'aws-cdk-lib/aws-lambda'
11
+ import { ISecret } from 'aws-cdk-lib/aws-secretsmanager'
6
12
  import { Construct } from 'constructs'
7
13
  import { CommonConstruct } from '../../common'
8
14
  import { ApiToLambdaTargetRestApi } from './api'
@@ -15,7 +21,7 @@ export class ApiToLambdaTarget extends CommonConstruct {
15
21
  id: string
16
22
 
17
23
  /* application related resources */
18
- applicationSecrets: secretsmanager.ISecret[]
24
+ applicationSecrets: ISecret[]
19
25
 
20
26
  /* rest restApi related resources */
21
27
  apiToLambdaTargetRestApi: ApiToLambdaTargetRestApiType
@@ -129,7 +135,7 @@ export class ApiToLambdaTarget extends CommonConstruct {
129
135
  }
130
136
 
131
137
  protected resolveApiToLambdaTargetFunction() {
132
- this.apiToLambdaTargetRestApi.lambda = lambda.Function.fromFunctionName(
138
+ this.apiToLambdaTargetRestApi.lambda = Function.fromFunctionName(
133
139
  this,
134
140
  `${this.id}-lambda`,
135
141
  this.props.lambdaFunctionName
@@ -141,17 +147,17 @@ export class ApiToLambdaTarget extends CommonConstruct {
141
147
  */
142
148
  protected createApiToLambdaTargetRestApi() {
143
149
  if (this.props.api.useExisting && this.props.api.importedRestApiRef) {
144
- this.apiToLambdaTargetRestApi.api = apig.RestApi.fromRestApiId(
150
+ this.apiToLambdaTargetRestApi.api = RestApi.fromRestApiId(
145
151
  this,
146
152
  `${this.id}-rest-api`,
147
- cdk.Fn.importValue(this.props.api.importedRestApiRef)
153
+ Fn.importValue(this.props.api.importedRestApiRef)
148
154
  )
149
155
  return
150
156
  }
151
157
 
152
158
  const accessLogGroup = this.logManager.createLogGroup(`${this.id}-rest-api-access-log`, this, {
153
159
  logGroupName: `/custom/api/${this.id}-rest-api-access`,
154
- removalPolicy: cdk.RemovalPolicy.DESTROY,
160
+ removalPolicy: RemovalPolicy.DESTROY,
155
161
  })
156
162
 
157
163
  this.props.api.restApi = {
@@ -164,7 +170,7 @@ export class ApiToLambdaTarget extends CommonConstruct {
164
170
  ],
165
171
  },
166
172
  deployOptions: {
167
- accessLogDestination: new apig.LogGroupLogDestination(accessLogGroup),
173
+ accessLogDestination: new LogGroupLogDestination(accessLogGroup),
168
174
  },
169
175
  },
170
176
  }
@@ -188,9 +194,9 @@ export class ApiToLambdaTarget extends CommonConstruct {
188
194
 
189
195
  let rootResource
190
196
  if (this.props.api.withResource && this.props.api.importedRestApiRootResourceRef) {
191
- rootResource = apig.Resource.fromResourceAttributes(this, `${this.id}-root-resource`, {
197
+ rootResource = Resource.fromResourceAttributes(this, `${this.id}-root-resource`, {
192
198
  path: '/',
193
- resourceId: cdk.Fn.importValue(this.props.api.importedRestApiRootResourceRef),
199
+ resourceId: Fn.importValue(this.props.api.importedRestApiRootResourceRef),
194
200
  restApi: this.apiToLambdaTargetRestApi.api,
195
201
  })
196
202
  } else {
@@ -201,7 +207,7 @@ export class ApiToLambdaTarget extends CommonConstruct {
201
207
  }
202
208
 
203
209
  protected createApiToLambdaTargetPolicy() {
204
- this.apiToLambdaTargetRestApi.policy = new iam.PolicyDocument({
210
+ this.apiToLambdaTargetRestApi.policy = new PolicyDocument({
205
211
  statements: [
206
212
  this.iamManager.statementForPutEvents(),
207
213
  this.iamManager.statementForInvokeLambda([this.apiToLambdaTargetRestApi.lambda.functionArn]),
@@ -215,8 +221,8 @@ export class ApiToLambdaTarget extends CommonConstruct {
215
221
  protected createApiToLambdaTargetRole() {
216
222
  if (!this.apiToLambdaTargetRestApi.policy) throw 'Policy undefined'
217
223
 
218
- this.apiToLambdaTargetRestApi.role = new iam.Role(this, `${this.id}-rest-api-role`, {
219
- assumedBy: new iam.ServicePrincipal('apigateway.amazonaws.com'),
224
+ this.apiToLambdaTargetRestApi.role = new Role(this, `${this.id}-rest-api-role`, {
225
+ assumedBy: new ServicePrincipal('apigateway.amazonaws.com'),
220
226
  inlinePolicies: { policy: this.apiToLambdaTargetRestApi.policy },
221
227
  })
222
228
  }
@@ -225,7 +231,7 @@ export class ApiToLambdaTarget extends CommonConstruct {
225
231
  * @summary Method to create api integration resource method
226
232
  */
227
233
  protected createApiToLambdaTargetIntegration() {
228
- this.apiToLambdaTargetRestApi.integration = new apig.LambdaIntegration(this.apiToLambdaTargetRestApi.lambda, {
234
+ this.apiToLambdaTargetRestApi.integration = new LambdaIntegration(this.apiToLambdaTargetRestApi.lambda, {
229
235
  allowTestInvoke: true,
230
236
  credentialsRole: this.apiToLambdaTargetRestApi.role,
231
237
  })
@@ -269,7 +275,7 @@ export class ApiToLambdaTarget extends CommonConstruct {
269
275
  */
270
276
  protected createApiBasePathMapping() {
271
277
  if (this.props.api.useExisting) return
272
- new apig.BasePathMapping(this, `${this.id}-base-bath-mapping`, {
278
+ new BasePathMapping(this, `${this.id}-base-bath-mapping`, {
273
279
  basePath: '',
274
280
  domainName: this.apiToLambdaTargetRestApi.domain,
275
281
  restApi: this.apiToLambdaTargetRestApi.api,
@@ -1,17 +1,24 @@
1
+ import { Fn } from 'aws-cdk-lib'
2
+ import {
3
+ CfnApplication,
4
+ CfnConfigurationProfile,
5
+ CfnDeployment,
6
+ CfnDeploymentStrategy,
7
+ CfnEnvironment,
8
+ CfnHostedConfigurationVersion,
9
+ } from 'aws-cdk-lib/aws-appconfig'
1
10
  import { Construct } from 'constructs'
2
- import * as cdk from 'aws-cdk-lib'
3
- import * as appconfig from 'aws-cdk-lib/aws-appconfig'
4
- import { ApplicationConfigurationProps } from './types'
5
11
  import { CommonConstruct } from '../../common'
12
+ import { ApplicationConfigurationProps } from './types'
6
13
 
7
14
  export class ApplicationConfiguration extends CommonConstruct {
8
- props: ApplicationConfigurationProps
15
+ declare props: ApplicationConfigurationProps
9
16
  id: string
10
- appConfigApplication: appconfig.CfnApplication
11
- appConfigEnvironment: appconfig.CfnEnvironment
12
- appConfigProfile: appconfig.CfnConfigurationProfile
13
- appConfigVersion: appconfig.CfnHostedConfigurationVersion
14
- appConfigDeploymentStrategy: appconfig.CfnDeploymentStrategy
17
+ appConfigApplication: CfnApplication
18
+ appConfigEnvironment: CfnEnvironment
19
+ appConfigProfile: CfnConfigurationProfile
20
+ appConfigVersion: CfnHostedConfigurationVersion
21
+ appConfigDeploymentStrategy: CfnDeploymentStrategy
15
22
 
16
23
  constructor(parent: Construct, id: string, props: ApplicationConfigurationProps) {
17
24
  super(parent, id, props)
@@ -45,7 +52,7 @@ export class ApplicationConfiguration extends CommonConstruct {
45
52
  this.appConfigEnvironment = this.appConfigManager.createEnvironment(
46
53
  `${this.id}-ac-environment`,
47
54
  this,
48
- cdk.Fn.ref(this.appConfigApplication.logicalId),
55
+ Fn.ref(this.appConfigApplication.logicalId),
49
56
  this.props.appConfig
50
57
  )
51
58
  }
@@ -54,22 +61,22 @@ export class ApplicationConfiguration extends CommonConstruct {
54
61
  this.appConfigProfile = this.appConfigManager.createConfigurationProfile(
55
62
  `${this.id}-ac-profile`,
56
63
  this,
57
- cdk.Fn.ref(this.appConfigApplication.logicalId),
64
+ Fn.ref(this.appConfigApplication.logicalId),
58
65
  this.props.appConfig
59
66
  )
60
67
  }
61
68
 
62
69
  protected createAppConfigVersion() {
63
- this.appConfigVersion = new appconfig.CfnHostedConfigurationVersion(this, `${this.id}-ac-configuration`, {
64
- applicationId: cdk.Fn.ref(this.appConfigApplication.logicalId),
65
- configurationProfileId: cdk.Fn.ref(this.appConfigProfile.logicalId),
70
+ this.appConfigVersion = new CfnHostedConfigurationVersion(this, `${this.id}-ac-configuration`, {
71
+ applicationId: Fn.ref(this.appConfigApplication.logicalId),
72
+ configurationProfileId: Fn.ref(this.appConfigProfile.logicalId),
66
73
  content: JSON.stringify(this.props.appConfigContent),
67
74
  contentType: 'application/json',
68
75
  })
69
76
  }
70
77
 
71
78
  protected createAppConfigDeploymentStrategy() {
72
- this.appConfigDeploymentStrategy = new appconfig.CfnDeploymentStrategy(this, `${this.id}-ac-deployment-strategy`, {
79
+ this.appConfigDeploymentStrategy = new CfnDeploymentStrategy(this, `${this.id}-ac-deployment-strategy`, {
73
80
  deploymentDurationInMinutes: this.props.appConfig.deploymentStrategy.deploymentDurationInMinutes,
74
81
  growthFactor: this.props.appConfig.deploymentStrategy.growthFactor,
75
82
  name: this.props.appConfig.deploymentStrategy.name,
@@ -78,20 +85,20 @@ export class ApplicationConfiguration extends CommonConstruct {
78
85
  }
79
86
 
80
87
  protected createAppConfigDeployment() {
81
- new appconfig.CfnDeployment(this, `${this.id}-app-config-deployment`, {
82
- applicationId: cdk.Fn.ref(this.appConfigApplication.logicalId),
83
- configurationProfileId: cdk.Fn.ref(this.appConfigProfile.logicalId),
84
- configurationVersion: cdk.Fn.ref(this.appConfigVersion.logicalId),
85
- deploymentStrategyId: cdk.Fn.ref(this.appConfigDeploymentStrategy.logicalId),
86
- environmentId: cdk.Fn.ref(this.appConfigEnvironment.logicalId),
88
+ new CfnDeployment(this, `${this.id}-app-config-deployment`, {
89
+ applicationId: Fn.ref(this.appConfigApplication.logicalId),
90
+ configurationProfileId: Fn.ref(this.appConfigProfile.logicalId),
91
+ configurationVersion: Fn.ref(this.appConfigVersion.logicalId),
92
+ deploymentStrategyId: Fn.ref(this.appConfigDeploymentStrategy.logicalId),
93
+ environmentId: Fn.ref(this.appConfigEnvironment.logicalId),
87
94
  })
88
95
  }
89
96
 
90
97
  public resolveEnvironmentVariables(): any {
91
98
  return {
92
- APP_CONFIG_APPLICATION_ID: cdk.Fn.ref(this.appConfigApplication.logicalId),
93
- APP_CONFIG_CONFIGURATION_PROFILE_ID: cdk.Fn.ref(this.appConfigProfile.logicalId),
94
- APP_CONFIG_ENVIRONMENT_ID: cdk.Fn.ref(this.appConfigEnvironment.logicalId),
99
+ APP_CONFIG_APPLICATION_ID: Fn.ref(this.appConfigApplication.logicalId),
100
+ APP_CONFIG_CONFIGURATION_PROFILE_ID: Fn.ref(this.appConfigProfile.logicalId),
101
+ APP_CONFIG_ENVIRONMENT_ID: Fn.ref(this.appConfigEnvironment.logicalId),
95
102
  }
96
103
  }
97
104
  }
@@ -1,9 +1,9 @@
1
- import * as apig from 'aws-cdk-lib/aws-apigateway'
2
- import * as acm from 'aws-cdk-lib/aws-certificatemanager'
3
- import * as iam from 'aws-cdk-lib/aws-iam'
4
- import * as lambda from 'aws-cdk-lib/aws-lambda'
5
- import * as route53 from 'aws-cdk-lib/aws-route53'
6
- import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager'
1
+ import { BasePathMapping, DomainName, RestApi } from 'aws-cdk-lib/aws-apigateway'
2
+ import { ICertificate } from 'aws-cdk-lib/aws-certificatemanager'
3
+ import { PolicyDocument, Role } from 'aws-cdk-lib/aws-iam'
4
+ import { AssetCode, IFunction, ILayerVersion, LayerVersion } from 'aws-cdk-lib/aws-lambda'
5
+ import { IHostedZone } from 'aws-cdk-lib/aws-route53'
6
+ import { ISecret } from 'aws-cdk-lib/aws-secretsmanager'
7
7
  import { Construct } from 'constructs'
8
8
  import { CommonConstruct } from '../../common'
9
9
  import { GraphQlApiLambdaEnvironment, GraphQlApiLambdaProps } from './types'
@@ -12,7 +12,7 @@ import { GraphQlApiLambdaEnvironment, GraphQlApiLambdaProps } from './types'
12
12
  * @deprecated Use RestApiLambda instead. This will be removed in a future release.
13
13
  * @classdesc Provides a construct to create and deploy a Graphql API as Lambda
14
14
  *
15
- * <b>Architecture</b><br/> ![Architecture](./GraphQLApiLambda.jpg)
15
+ * <b>Architecture</b><br/> ![Architecture](./GraphQLApi.jpg)
16
16
  * @example
17
17
  * import { GraphQLApiLambda, GraphQlApiLambdaProps } '@gradientedge/cdk-utils'
18
18
  * import { Construct } from 'constructs'
@@ -32,17 +32,17 @@ export class GraphQLApiLambda extends CommonConstruct {
32
32
  id: string
33
33
 
34
34
  /* graphql restApi resources */
35
- applicationSecrets: secretsmanager.ISecret[]
36
- graphQLApiLambdaPolicy: iam.PolicyDocument
37
- graphQLApiLambdaRole: iam.Role
35
+ applicationSecrets: ISecret[]
36
+ graphQLApiLambdaPolicy: PolicyDocument
37
+ graphQLApiLambdaRole: Role
38
38
  graphQLApiLambdaEnvironment: GraphQlApiLambdaEnvironment
39
- graphQLApiLambdaLayers: lambda.ILayerVersion[] = []
40
- graphQLApiLambdaFunction: lambda.Function
41
- graphQLApi: apig.RestApi
42
- graphQLApiHostedZone: route53.IHostedZone
43
- graphQLApiCertificate: acm.ICertificate
44
- graphQLApiDomain: apig.DomainName
45
- graphQLApiBasePathMappings: apig.BasePathMapping[] = []
39
+ graphQLApiLambdaLayers: ILayerVersion[] = []
40
+ graphQLApiLambdaFunction: IFunction
41
+ graphQLApi: RestApi
42
+ graphQLApiHostedZone: IHostedZone
43
+ graphQLApiCertificate: ICertificate
44
+ graphQLApiDomain: DomainName
45
+ graphQLApiBasePathMappings: BasePathMapping[] = []
46
46
 
47
47
  constructor(parent: Construct, id: string, props: GraphQlApiLambdaProps) {
48
48
  super(parent, id, props)
@@ -116,7 +116,7 @@ export class GraphQLApiLambda extends CommonConstruct {
116
116
  * @summary Method to create iam policy for GraphQL Lambda function
117
117
  */
118
118
  protected createLambdaPolicy() {
119
- this.graphQLApiLambdaPolicy = new iam.PolicyDocument({
119
+ this.graphQLApiLambdaPolicy = new PolicyDocument({
120
120
  statements: [this.iamManager.statementForCreateAnyLogStream()],
121
121
  })
122
122
  }
@@ -147,11 +147,11 @@ export class GraphQLApiLambda extends CommonConstruct {
147
147
  * @summary Method to create layers for GraphQL Lambda function
148
148
  */
149
149
  protected createLambdaLayers() {
150
- const layers: lambda.LayerVersion[] = []
150
+ const layers: LayerVersion[] = []
151
151
 
152
152
  if (!this.props.graphqlApiLambdaLayerSources) return
153
153
 
154
- this.props.graphqlApiLambdaLayerSources.forEach((source: lambda.AssetCode, index: number) => {
154
+ this.props.graphqlApiLambdaLayerSources.forEach((source: AssetCode, index: number) => {
155
155
  layers.push(this.lambdaManager.createLambdaLayer(`${this.id}-layer-${index}`, this, source))
156
156
  })
157
157
 
@@ -208,7 +208,7 @@ export class GraphQLApiLambda extends CommonConstruct {
208
208
  if (apiRootPaths && apiRootPaths.length > 0) {
209
209
  apiRootPaths.forEach((apiRootPath: string) => {
210
210
  this.graphQLApiBasePathMappings.push(
211
- new apig.BasePathMapping(this, `${this.id}-base-bath-mapping-${apiRootPath}`, {
211
+ new BasePathMapping(this, `${this.id}-base-bath-mapping-${apiRootPath}`, {
212
212
  basePath: apiRootPath,
213
213
  domainName: this.graphQLApiDomain,
214
214
  restApi: this.graphQLApi,
@@ -220,7 +220,7 @@ export class GraphQLApiLambda extends CommonConstruct {
220
220
  }
221
221
 
222
222
  // add default mapping if apiRootPaths not set
223
- new apig.BasePathMapping(this, `${this.id}-base-bath-mapping`, {
223
+ new BasePathMapping(this, `${this.id}-base-bath-mapping`, {
224
224
  domainName: this.graphQLApiDomain,
225
225
  restApi: this.graphQLApi,
226
226
  stage: this.graphQLApi.deploymentStage,
@@ -1,11 +1,11 @@
1
- import * as cdk from 'aws-cdk-lib'
2
- import * as ec2 from 'aws-cdk-lib/aws-ec2'
3
- import * as elasticache from 'aws-cdk-lib/aws-elasticache'
4
- import * as iam from 'aws-cdk-lib/aws-iam'
1
+ import { Fn } from 'aws-cdk-lib'
2
+ import { ISecurityGroup, IVpc, Peer, Port, SecurityGroup } from 'aws-cdk-lib/aws-ec2'
3
+ import { CfnReplicationGroup } from 'aws-cdk-lib/aws-elasticache'
4
+ import { ManagedPolicy } from 'aws-cdk-lib/aws-iam'
5
5
  import { Construct } from 'constructs'
6
6
  import { GraphQLApiLambda } from '..'
7
- import { GraphQlApiLambdaWithCacheProps } from './types'
8
7
  import * as utils from '../../utils'
8
+ import { GraphQlApiLambdaWithCacheProps } from './types'
9
9
 
10
10
  /**
11
11
  * @deprecated Use RestApiLambdaWithCache instead. This will be removed in a future release.
@@ -31,9 +31,9 @@ export class GraphQLApiLambdaWithCache extends GraphQLApiLambda {
31
31
  id: string
32
32
 
33
33
  /* graphql restApi resources */
34
- graphQLVpc: ec2.IVpc
35
- graphQLElastiCache: elasticache.CfnReplicationGroup
36
- graphQLSecurityGroup: ec2.ISecurityGroup
34
+ graphQLVpc: IVpc
35
+ graphQLElastiCache: CfnReplicationGroup
36
+ graphQLSecurityGroup: ISecurityGroup
37
37
  securityGroupExportName: string
38
38
 
39
39
  constructor(parent: Construct, id: string, props: GraphQlApiLambdaWithCacheProps) {
@@ -66,18 +66,18 @@ export class GraphQLApiLambdaWithCache extends GraphQLApiLambda {
66
66
  */
67
67
  protected setSecurityGroup() {
68
68
  if (this.props.securityGroupExportName) {
69
- this.graphQLSecurityGroup = ec2.SecurityGroup.fromSecurityGroupId(
69
+ this.graphQLSecurityGroup = SecurityGroup.fromSecurityGroupId(
70
70
  this,
71
71
  `${this.id}`,
72
- cdk.Fn.importValue(this.props.securityGroupExportName)
72
+ Fn.importValue(this.props.securityGroupExportName)
73
73
  )
74
74
  } else {
75
- this.graphQLSecurityGroup = new ec2.SecurityGroup(this, `${this.id}-security-group-${this.props.stage}`, {
75
+ this.graphQLSecurityGroup = new SecurityGroup(this, `${this.id}-security-group-${this.props.stage}`, {
76
76
  securityGroupName: `${this.id}-security-group-${this.props.stage}`,
77
77
  vpc: this.graphQLVpc,
78
78
  })
79
79
 
80
- this.graphQLSecurityGroup.addIngressRule(ec2.Peer.anyIpv4(), ec2.Port.allTraffic(), 'All Traffic')
80
+ this.graphQLSecurityGroup.addIngressRule(Peer.anyIpv4(), Port.allTraffic(), 'All Traffic')
81
81
 
82
82
  utils.createCfnOutput(`${this.id}-security-group-id`, this, this.graphQLSecurityGroup.securityGroupId)
83
83
  }
@@ -103,7 +103,7 @@ export class GraphQLApiLambdaWithCache extends GraphQLApiLambda {
103
103
  super.createLambdaRole()
104
104
 
105
105
  this.graphQLApiLambdaRole.addManagedPolicy(
106
- iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSLambdaVPCAccessExecutionRole')
106
+ ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSLambdaVPCAccessExecutionRole')
107
107
  )
108
108
  }
109
109
 
@@ -1,8 +1,8 @@
1
- import * as ec2 from 'aws-cdk-lib/aws-ec2'
2
- import * as efs from 'aws-cdk-lib/aws-efs'
3
- import * as iam from 'aws-cdk-lib/aws-iam'
4
- import * as lambda from 'aws-cdk-lib/aws-lambda'
5
- import * as secretsManager from 'aws-cdk-lib/aws-secretsmanager'
1
+ import { ISecurityGroup, IVpc, SubnetSelection } from 'aws-cdk-lib/aws-ec2'
2
+ import { IAccessPoint } from 'aws-cdk-lib/aws-efs'
3
+ import { CfnAccessKey, Policy, PolicyDocument, PolicyStatement, Role, User } from 'aws-cdk-lib/aws-iam'
4
+ import { AssetCode, IFunction, ILayerVersion, LayerVersion } from 'aws-cdk-lib/aws-lambda'
5
+ import { CfnSecret, Secret } from 'aws-cdk-lib/aws-secretsmanager'
6
6
  import { Construct } from 'constructs'
7
7
  import { CommonConstruct } from '../../common'
8
8
  import { LambdaWithIamAccessEnvironment, LambdaWithIamAccessProps } from './types'
@@ -28,19 +28,19 @@ export class LambdaWithIamAccess extends CommonConstruct {
28
28
  id: string
29
29
 
30
30
  /* LambdaWithIamAccess resources */
31
- lambdaPolicy: iam.PolicyDocument
32
- lambdaRole: iam.Role
31
+ lambdaPolicy: PolicyDocument
32
+ lambdaRole: Role
33
33
  lambdaEnvironment: LambdaWithIamAccessEnvironment
34
- lambdaLayers: lambda.ILayerVersion[]
35
- lambdaFunction: lambda.Function
36
- lambdaIamUser: iam.User
37
- lambdaUserAccessKey: iam.CfnAccessKey
38
- lambdaUserAccessSecret: secretsManager.Secret
39
- lambdaVpc: ec2.IVpc
40
- lambdaSecurityGroups: ec2.ISecurityGroup[]
41
- lambdaAccessPoint: efs.IAccessPoint
34
+ lambdaLayers: ILayerVersion[]
35
+ lambdaFunction: IFunction
36
+ lambdaIamUser: User
37
+ lambdaUserAccessKey: CfnAccessKey
38
+ lambdaUserAccessSecret: Secret
39
+ lambdaVpc: IVpc
40
+ lambdaSecurityGroups: ISecurityGroup[]
41
+ lambdaAccessPoint: IAccessPoint
42
42
  lambdaMountPath: string
43
- lambdaVpcSubnets: ec2.SubnetSelection
43
+ lambdaVpcSubnets: SubnetSelection
44
44
 
45
45
  constructor(parent: Construct, id: string, props: LambdaWithIamAccessProps) {
46
46
  super(parent, id, props)
@@ -81,7 +81,7 @@ export class LambdaWithIamAccess extends CommonConstruct {
81
81
  * @summary Method to create iam policy for Lambda function
82
82
  */
83
83
  protected createLambdaPolicy() {
84
- this.lambdaPolicy = new iam.PolicyDocument({
84
+ this.lambdaPolicy = new PolicyDocument({
85
85
  statements: [this.iamManager.statementForCreateAnyLogStream()],
86
86
  })
87
87
  }
@@ -108,11 +108,11 @@ export class LambdaWithIamAccess extends CommonConstruct {
108
108
  * @summary Method to create layers for Lambda function
109
109
  */
110
110
  protected createLambdaLayers() {
111
- const layers: lambda.LayerVersion[] = []
111
+ const layers: LayerVersion[] = []
112
112
 
113
113
  if (!this.props.lambdaLayerSources) return
114
114
 
115
- this.props.lambdaLayerSources.forEach((source: lambda.AssetCode, index: number) => {
115
+ this.props.lambdaLayerSources.forEach((source: AssetCode, index: number) => {
116
116
  layers.push(this.lambdaManager.createLambdaLayer(`${this.id}-layer-${index}`, this, source))
117
117
  })
118
118
 
@@ -144,14 +144,14 @@ export class LambdaWithIamAccess extends CommonConstruct {
144
144
  * @summary Method to create iam user for the lambda function
145
145
  */
146
146
  protected createIamUserForLambdaFunction() {
147
- this.lambdaIamUser = new iam.User(this, `${this.id}-lambda-user`, {
147
+ this.lambdaIamUser = new User(this, `${this.id}-lambda-user`, {
148
148
  userName: `${this.id}-user-${this.props.stage}`,
149
149
  })
150
150
 
151
- new iam.Policy(this, `${this.id}-lambda-user-policy`, {
151
+ new Policy(this, `${this.id}-lambda-user-policy`, {
152
152
  policyName: `${this.id}-policy-${this.props.stage}`,
153
153
  statements: [
154
- new iam.PolicyStatement({
154
+ new PolicyStatement({
155
155
  actions: ['lambda:InvokeFunction'],
156
156
  resources: [this.lambdaFunction.functionArn],
157
157
  }),
@@ -159,7 +159,7 @@ export class LambdaWithIamAccess extends CommonConstruct {
159
159
  users: [this.lambdaIamUser],
160
160
  })
161
161
 
162
- this.lambdaUserAccessKey = new iam.CfnAccessKey(this, `${this.id}-access-key-${this.props.stage}`, {
162
+ this.lambdaUserAccessKey = new CfnAccessKey(this, `${this.id}-access-key-${this.props.stage}`, {
163
163
  userName: this.lambdaIamUser.userName,
164
164
  })
165
165
  }
@@ -168,13 +168,13 @@ export class LambdaWithIamAccess extends CommonConstruct {
168
168
  * @summary Method to create iam secret for the lambda function
169
169
  */
170
170
  protected createIamSecretForLambdaFunction() {
171
- this.lambdaUserAccessSecret = new secretsManager.Secret(
171
+ this.lambdaUserAccessSecret = new Secret(
172
172
  this,
173
173
  `${this.id}-lambda-user-secret-${this.props.stage}`,
174
174
  this.props.lambdaSecret
175
175
  )
176
176
 
177
- const cfnSecret = this.lambdaUserAccessSecret.node.defaultChild as secretsManager.CfnSecret
177
+ const cfnSecret = this.lambdaUserAccessSecret.node.defaultChild as CfnSecret
178
178
  cfnSecret.generateSecretString = undefined
179
179
  cfnSecret.secretString = `{ "ACCESS_KEY_ID": "${this.lambdaUserAccessKey.ref}", "ACCESS_KEY_SECRET": "${this.lambdaUserAccessKey.attrSecretAccessKey}" }`
180
180
  }
@@ -1,14 +1,14 @@
1
- import * as lambda from 'aws-cdk-lib/aws-lambda'
1
+ import { AssetCode } from 'aws-cdk-lib/aws-lambda'
2
2
  import { SecretProps } from 'aws-cdk-lib/aws-secretsmanager'
3
- import { LambdaEnvironment, LambdaProps } from '../../services'
4
3
  import { CommonStackProps } from '../../common'
4
+ import { LambdaEnvironment, LambdaProps } from '../../services'
5
5
 
6
6
  export interface LambdaWithIamAccessProps extends CommonStackProps {
7
7
  lambda: LambdaProps
8
8
  lambdaHandler?: string
9
- lambdaLayerSources: lambda.AssetCode[]
9
+ lambdaLayerSources: AssetCode[]
10
10
  lambdaSecret: SecretProps
11
- lambdaSource: lambda.AssetCode
11
+ lambdaSource: AssetCode
12
12
  logLevel: string
13
13
  nodeEnv: string
14
14
  timezone: string
@@ -1,9 +1,9 @@
1
- import * as apig from 'aws-cdk-lib/aws-apigateway'
2
- import * as acm from 'aws-cdk-lib/aws-certificatemanager'
3
- import * as iam from 'aws-cdk-lib/aws-iam'
4
- import * as lambda from 'aws-cdk-lib/aws-lambda'
5
- import * as route53 from 'aws-cdk-lib/aws-route53'
6
- import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager'
1
+ import { BasePathMapping, DomainName, RestApi } from 'aws-cdk-lib/aws-apigateway'
2
+ import { ICertificate } from 'aws-cdk-lib/aws-certificatemanager'
3
+ import { PolicyDocument, Role } from 'aws-cdk-lib/aws-iam'
4
+ import { AssetCode, IFunction, ILayerVersion, LayerVersion } from 'aws-cdk-lib/aws-lambda'
5
+ import { IHostedZone } from 'aws-cdk-lib/aws-route53'
6
+ import { ISecret } from 'aws-cdk-lib/aws-secretsmanager'
7
7
  import { Construct } from 'constructs'
8
8
  import { CommonConstruct } from '../../common'
9
9
  import { RestApiLambdaEnvironment, RestApiLambdaProps } from './types'
@@ -31,17 +31,17 @@ export abstract class RestApiLambda extends CommonConstruct {
31
31
  id: string
32
32
 
33
33
  /* restApiLambda resources */
34
- applicationSecrets: secretsmanager.ISecret[]
35
- restApiLambdaPolicy: iam.PolicyDocument
36
- restApiLambdaRole: iam.Role
34
+ applicationSecrets: ISecret[]
35
+ restApiLambdaPolicy: PolicyDocument
36
+ restApiLambdaRole: Role
37
37
  restApiLambdaEnvironment: RestApiLambdaEnvironment
38
- restApiLambdaLayers: lambda.ILayerVersion[] = []
39
- restApiLambdaFunction: lambda.Function
40
- restApi: apig.RestApi
41
- restApiHostedZone: route53.IHostedZone
42
- restApiCertificate: acm.ICertificate
43
- restApiDomain: apig.DomainName
44
- restApiBasePathMappings: apig.BasePathMapping[] = []
38
+ restApiLambdaLayers: ILayerVersion[] = []
39
+ restApiLambdaFunction: IFunction
40
+ restApi: RestApi
41
+ restApiHostedZone: IHostedZone
42
+ restApiCertificate: ICertificate
43
+ restApiDomain: DomainName
44
+ restApiBasePathMappings: BasePathMapping[] = []
45
45
 
46
46
  protected constructor(parent: Construct, id: string, props: RestApiLambdaProps) {
47
47
  super(parent, id, props)
@@ -117,7 +117,7 @@ export abstract class RestApiLambda extends CommonConstruct {
117
117
  * @summary Method to create iam policy for RestApi Lambda function
118
118
  */
119
119
  protected createLambdaPolicy() {
120
- this.restApiLambdaPolicy = new iam.PolicyDocument({
120
+ this.restApiLambdaPolicy = new PolicyDocument({
121
121
  statements: [this.iamManager.statementForCreateAnyLogStream()],
122
122
  })
123
123
  }
@@ -148,11 +148,11 @@ export abstract class RestApiLambda extends CommonConstruct {
148
148
  * @summary Method to create layers for RestApi Lambda function
149
149
  */
150
150
  protected createLambdaLayers() {
151
- const layers: lambda.LayerVersion[] = []
151
+ const layers: LayerVersion[] = []
152
152
 
153
153
  if (!this.props.restApiLambdaLayerSources) return
154
154
 
155
- this.props.restApiLambdaLayerSources.forEach((source: lambda.AssetCode, index: number) => {
155
+ this.props.restApiLambdaLayerSources.forEach((source: AssetCode, index: number) => {
156
156
  layers.push(this.lambdaManager.createLambdaLayer(`${this.id}-layer-${index}`, this, source))
157
157
  })
158
158
 
@@ -211,7 +211,7 @@ export abstract class RestApiLambda extends CommonConstruct {
211
211
  if (apiRootPaths && apiRootPaths.length > 0) {
212
212
  apiRootPaths.forEach((apiRootPath: string) => {
213
213
  this.restApiBasePathMappings.push(
214
- new apig.BasePathMapping(this, `${this.id}-base-bath-mapping-${apiRootPath}`, {
214
+ new BasePathMapping(this, `${this.id}-base-bath-mapping-${apiRootPath}`, {
215
215
  basePath: apiRootPath,
216
216
  domainName: this.restApiDomain,
217
217
  restApi: this.restApi,
@@ -223,7 +223,7 @@ export abstract class RestApiLambda extends CommonConstruct {
223
223
  }
224
224
 
225
225
  // add default mapping if apiRootPaths not set
226
- new apig.BasePathMapping(this, `${this.id}-base-bath-mapping`, {
226
+ new BasePathMapping(this, `${this.id}-base-bath-mapping`, {
227
227
  domainName: this.restApiDomain,
228
228
  restApi: this.restApi,
229
229
  stage: this.restApi.deploymentStage,