@epilot360/icons 0.0.1 → 0.0.2

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 (459) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -0
  3. package/dist/bundle.js +2 -0
  4. package/dist/bundle.js.map +1 -0
  5. package/iac/node_modules/@balena/dockerignore/LICENSE.md +206 -0
  6. package/iac/node_modules/@balena/dockerignore/README.md +261 -0
  7. package/iac/node_modules/@cspotcode/source-map-support/LICENSE.md +21 -0
  8. package/iac/node_modules/@cspotcode/source-map-support/README.md +289 -0
  9. package/iac/node_modules/@jridgewell/resolve-uri/LICENSE +19 -0
  10. package/iac/node_modules/@jridgewell/resolve-uri/README.md +40 -0
  11. package/iac/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map +1 -0
  12. package/iac/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map +1 -0
  13. package/iac/node_modules/@jridgewell/sourcemap-codec/LICENSE +21 -0
  14. package/iac/node_modules/@jridgewell/sourcemap-codec/README.md +200 -0
  15. package/iac/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +1 -0
  16. package/iac/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +1 -0
  17. package/iac/node_modules/@jridgewell/trace-mapping/LICENSE +19 -0
  18. package/iac/node_modules/@jridgewell/trace-mapping/README.md +193 -0
  19. package/iac/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +1 -0
  20. package/iac/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +1 -0
  21. package/iac/node_modules/@tsconfig/node10/LICENSE +21 -0
  22. package/iac/node_modules/@tsconfig/node10/README.md +40 -0
  23. package/iac/node_modules/@tsconfig/node12/LICENSE +21 -0
  24. package/iac/node_modules/@tsconfig/node12/README.md +40 -0
  25. package/iac/node_modules/@tsconfig/node14/LICENSE +21 -0
  26. package/iac/node_modules/@tsconfig/node14/README.md +40 -0
  27. package/iac/node_modules/@tsconfig/node16/LICENSE +21 -0
  28. package/iac/node_modules/@tsconfig/node16/README.md +40 -0
  29. package/iac/node_modules/@types/jest/LICENSE +21 -0
  30. package/iac/node_modules/@types/jest/README.md +17 -0
  31. package/iac/node_modules/@types/node/LICENSE +21 -0
  32. package/iac/node_modules/@types/node/README.md +16 -0
  33. package/iac/node_modules/@types/prettier/LICENSE +21 -0
  34. package/iac/node_modules/@types/prettier/README.md +16 -0
  35. package/iac/node_modules/acorn/LICENSE +21 -0
  36. package/iac/node_modules/acorn/README.md +273 -0
  37. package/iac/node_modules/acorn-walk/LICENSE +21 -0
  38. package/iac/node_modules/acorn-walk/README.md +126 -0
  39. package/iac/node_modules/ansi-regex/license +9 -0
  40. package/iac/node_modules/ansi-regex/readme.md +78 -0
  41. package/iac/node_modules/ansi-styles/license +9 -0
  42. package/iac/node_modules/ansi-styles/readme.md +144 -0
  43. package/iac/node_modules/arg/LICENSE.md +21 -0
  44. package/iac/node_modules/arg/README.md +280 -0
  45. package/iac/node_modules/at-least-node/LICENSE +6 -0
  46. package/iac/node_modules/at-least-node/README.md +25 -0
  47. package/iac/node_modules/aws-cdk/LICENSE +201 -0
  48. package/iac/node_modules/aws-cdk/README.md +742 -0
  49. package/iac/node_modules/aws-cdk/lib/init-templates/LICENSE +16 -0
  50. package/iac/node_modules/aws-cdk/lib/init-templates/app/csharp/README.md +14 -0
  51. package/iac/node_modules/aws-cdk/lib/init-templates/app/fsharp/README.md +18 -0
  52. package/iac/node_modules/aws-cdk/lib/init-templates/app/go/README.md +12 -0
  53. package/iac/node_modules/aws-cdk/lib/init-templates/app/java/README.md +18 -0
  54. package/iac/node_modules/aws-cdk/lib/init-templates/app/javascript/README.md +12 -0
  55. package/iac/node_modules/aws-cdk/lib/init-templates/app/python/README.template.md +58 -0
  56. package/iac/node_modules/aws-cdk/lib/init-templates/app/typescript/README.md +14 -0
  57. package/iac/node_modules/aws-cdk/lib/init-templates/lib/typescript/README.template.md +12 -0
  58. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/csharp/README.template.md +19 -0
  59. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/fsharp/README.template.md +20 -0
  60. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/go/README.md +12 -0
  61. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/java/README.template.md +19 -0
  62. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/javascript/README.template.md +13 -0
  63. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/python/README.template.md +65 -0
  64. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/typescript/README.template.md +15 -0
  65. package/iac/node_modules/aws-cdk/test/integ/cli/README.md +48 -0
  66. package/iac/node_modules/aws-cdk/test/integ/cli-regression-patches/README.md +54 -0
  67. package/iac/node_modules/aws-cdk-lib/LICENSE +201 -0
  68. package/iac/node_modules/aws-cdk-lib/README.md +1119 -0
  69. package/iac/node_modules/aws-cdk-lib/alexa-ask/README.md +27 -0
  70. package/iac/node_modules/aws-cdk-lib/assertions/README.md +571 -0
  71. package/iac/node_modules/aws-cdk-lib/assets/README.md +4 -0
  72. package/iac/node_modules/aws-cdk-lib/aws-accessanalyzer/README.md +27 -0
  73. package/iac/node_modules/aws-cdk-lib/aws-acmpca/README.md +59 -0
  74. package/iac/node_modules/aws-cdk-lib/aws-amazonmq/README.md +27 -0
  75. package/iac/node_modules/aws-cdk-lib/aws-amplify/README.md +32 -0
  76. package/iac/node_modules/aws-cdk-lib/aws-amplifyuibuilder/README.md +27 -0
  77. package/iac/node_modules/aws-cdk-lib/aws-apigateway/README.md +1335 -0
  78. package/iac/node_modules/aws-cdk-lib/aws-apigatewayv2/README.md +32 -0
  79. package/iac/node_modules/aws-cdk-lib/aws-appconfig/README.md +27 -0
  80. package/iac/node_modules/aws-cdk-lib/aws-appflow/README.md +27 -0
  81. package/iac/node_modules/aws-cdk-lib/aws-appintegrations/README.md +27 -0
  82. package/iac/node_modules/aws-cdk-lib/aws-applicationautoscaling/README.md +246 -0
  83. package/iac/node_modules/aws-cdk-lib/aws-applicationinsights/README.md +27 -0
  84. package/iac/node_modules/aws-cdk-lib/aws-appmesh/README.md +883 -0
  85. package/iac/node_modules/aws-cdk-lib/aws-apprunner/README.md +32 -0
  86. package/iac/node_modules/aws-cdk-lib/aws-appstream/README.md +27 -0
  87. package/iac/node_modules/aws-cdk-lib/aws-appsync/README.md +32 -0
  88. package/iac/node_modules/aws-cdk-lib/aws-aps/README.md +27 -0
  89. package/iac/node_modules/aws-cdk-lib/aws-athena/README.md +27 -0
  90. package/iac/node_modules/aws-cdk-lib/aws-auditmanager/README.md +27 -0
  91. package/iac/node_modules/aws-cdk-lib/aws-autoscaling/README.md +540 -0
  92. package/iac/node_modules/aws-cdk-lib/aws-autoscaling-common/README.md +8 -0
  93. package/iac/node_modules/aws-cdk-lib/aws-autoscaling-hooktargets/README.md +18 -0
  94. package/iac/node_modules/aws-cdk-lib/aws-autoscalingplans/README.md +27 -0
  95. package/iac/node_modules/aws-cdk-lib/aws-backup/README.md +210 -0
  96. package/iac/node_modules/aws-cdk-lib/aws-batch/README.md +32 -0
  97. package/iac/node_modules/aws-cdk-lib/aws-billingconductor/README.md +27 -0
  98. package/iac/node_modules/aws-cdk-lib/aws-budgets/README.md +27 -0
  99. package/iac/node_modules/aws-cdk-lib/aws-cassandra/README.md +27 -0
  100. package/iac/node_modules/aws-cdk-lib/aws-ce/README.md +27 -0
  101. package/iac/node_modules/aws-cdk-lib/aws-certificatemanager/README.md +166 -0
  102. package/iac/node_modules/aws-cdk-lib/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/README.md +2 -0
  103. package/iac/node_modules/aws-cdk-lib/aws-certificatemanager/suffixes/README.txt +8 -0
  104. package/iac/node_modules/aws-cdk-lib/aws-chatbot/README.md +44 -0
  105. package/iac/node_modules/aws-cdk-lib/aws-cloud9/README.md +32 -0
  106. package/iac/node_modules/aws-cdk-lib/aws-cloudformation/README.md +4 -0
  107. package/iac/node_modules/aws-cdk-lib/aws-cloudfront/README.md +973 -0
  108. package/iac/node_modules/aws-cdk-lib/aws-cloudfront-origins/README.md +126 -0
  109. package/iac/node_modules/aws-cdk-lib/aws-cloudtrail/README.md +189 -0
  110. package/iac/node_modules/aws-cdk-lib/aws-cloudwatch/README.md +579 -0
  111. package/iac/node_modules/aws-cdk-lib/aws-cloudwatch-actions/README.md +43 -0
  112. package/iac/node_modules/aws-cdk-lib/aws-codeartifact/README.md +27 -0
  113. package/iac/node_modules/aws-cdk-lib/aws-codebuild/README.md +759 -0
  114. package/iac/node_modules/aws-cdk-lib/aws-codecommit/README.md +85 -0
  115. package/iac/node_modules/aws-cdk-lib/aws-codedeploy/README.md +319 -0
  116. package/iac/node_modules/aws-cdk-lib/aws-codeguruprofiler/README.md +37 -0
  117. package/iac/node_modules/aws-cdk-lib/aws-codegurureviewer/README.md +27 -0
  118. package/iac/node_modules/aws-cdk-lib/aws-codepipeline/README.md +481 -0
  119. package/iac/node_modules/aws-cdk-lib/aws-codepipeline-actions/README.md +1203 -0
  120. package/iac/node_modules/aws-cdk-lib/aws-codestar/README.md +32 -0
  121. package/iac/node_modules/aws-cdk-lib/aws-codestarconnections/README.md +27 -0
  122. package/iac/node_modules/aws-cdk-lib/aws-codestarnotifications/README.md +68 -0
  123. package/iac/node_modules/aws-cdk-lib/aws-cognito/README.md +843 -0
  124. package/iac/node_modules/aws-cdk-lib/aws-config/README.md +218 -0
  125. package/iac/node_modules/aws-cdk-lib/aws-connect/README.md +27 -0
  126. package/iac/node_modules/aws-cdk-lib/aws-controltower/README.md +27 -0
  127. package/iac/node_modules/aws-cdk-lib/aws-cur/README.md +27 -0
  128. package/iac/node_modules/aws-cdk-lib/aws-customerprofiles/README.md +27 -0
  129. package/iac/node_modules/aws-cdk-lib/aws-databrew/README.md +27 -0
  130. package/iac/node_modules/aws-cdk-lib/aws-datapipeline/README.md +27 -0
  131. package/iac/node_modules/aws-cdk-lib/aws-datasync/README.md +27 -0
  132. package/iac/node_modules/aws-cdk-lib/aws-dax/README.md +27 -0
  133. package/iac/node_modules/aws-cdk-lib/aws-detective/README.md +27 -0
  134. package/iac/node_modules/aws-cdk-lib/aws-devopsguru/README.md +27 -0
  135. package/iac/node_modules/aws-cdk-lib/aws-directoryservice/README.md +27 -0
  136. package/iac/node_modules/aws-cdk-lib/aws-dlm/README.md +27 -0
  137. package/iac/node_modules/aws-cdk-lib/aws-dms/README.md +27 -0
  138. package/iac/node_modules/aws-cdk-lib/aws-docdb/README.md +153 -0
  139. package/iac/node_modules/aws-cdk-lib/aws-dynamodb/README.md +200 -0
  140. package/iac/node_modules/aws-cdk-lib/aws-ec2/README.md +1514 -0
  141. package/iac/node_modules/aws-cdk-lib/aws-ecr/README.md +110 -0
  142. package/iac/node_modules/aws-cdk-lib/aws-ecr-assets/README.md +167 -0
  143. package/iac/node_modules/aws-cdk-lib/aws-ecs/README.md +1225 -0
  144. package/iac/node_modules/aws-cdk-lib/aws-ecs-patterns/README.md +980 -0
  145. package/iac/node_modules/aws-cdk-lib/aws-efs/README.md +154 -0
  146. package/iac/node_modules/aws-cdk-lib/aws-eks/README.md +1450 -0
  147. package/iac/node_modules/aws-cdk-lib/aws-elasticache/README.md +27 -0
  148. package/iac/node_modules/aws-cdk-lib/aws-elasticbeanstalk/README.md +27 -0
  149. package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancing/README.md +40 -0
  150. package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancingv2/README.md +569 -0
  151. package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancingv2-actions/README.md +68 -0
  152. package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancingv2-targets/README.md +4 -0
  153. package/iac/node_modules/aws-cdk-lib/aws-elasticsearch/README.md +441 -0
  154. package/iac/node_modules/aws-cdk-lib/aws-emr/README.md +27 -0
  155. package/iac/node_modules/aws-cdk-lib/aws-emrcontainers/README.md +27 -0
  156. package/iac/node_modules/aws-cdk-lib/aws-emrserverless/README.md +27 -0
  157. package/iac/node_modules/aws-cdk-lib/aws-events/README.md +249 -0
  158. package/iac/node_modules/aws-cdk-lib/aws-events-targets/README.md +339 -0
  159. package/iac/node_modules/aws-cdk-lib/aws-eventschemas/README.md +27 -0
  160. package/iac/node_modules/aws-cdk-lib/aws-evidently/README.md +27 -0
  161. package/iac/node_modules/aws-cdk-lib/aws-finspace/README.md +27 -0
  162. package/iac/node_modules/aws-cdk-lib/aws-fis/README.md +27 -0
  163. package/iac/node_modules/aws-cdk-lib/aws-fms/README.md +27 -0
  164. package/iac/node_modules/aws-cdk-lib/aws-forecast/README.md +27 -0
  165. package/iac/node_modules/aws-cdk-lib/aws-frauddetector/README.md +27 -0
  166. package/iac/node_modules/aws-cdk-lib/aws-fsx/README.md +200 -0
  167. package/iac/node_modules/aws-cdk-lib/aws-gamelift/README.md +27 -0
  168. package/iac/node_modules/aws-cdk-lib/aws-globalaccelerator/README.md +182 -0
  169. package/iac/node_modules/aws-cdk-lib/aws-globalaccelerator-endpoints/README.md +10 -0
  170. package/iac/node_modules/aws-cdk-lib/aws-glue/README.md +32 -0
  171. package/iac/node_modules/aws-cdk-lib/aws-greengrass/README.md +27 -0
  172. package/iac/node_modules/aws-cdk-lib/aws-greengrassv2/README.md +27 -0
  173. package/iac/node_modules/aws-cdk-lib/aws-groundstation/README.md +27 -0
  174. package/iac/node_modules/aws-cdk-lib/aws-guardduty/README.md +27 -0
  175. package/iac/node_modules/aws-cdk-lib/aws-healthlake/README.md +27 -0
  176. package/iac/node_modules/aws-cdk-lib/aws-iam/README.md +509 -0
  177. package/iac/node_modules/aws-cdk-lib/aws-imagebuilder/README.md +27 -0
  178. package/iac/node_modules/aws-cdk-lib/aws-inspector/README.md +27 -0
  179. package/iac/node_modules/aws-cdk-lib/aws-inspectorv2/README.md +27 -0
  180. package/iac/node_modules/aws-cdk-lib/aws-iot/README.md +32 -0
  181. package/iac/node_modules/aws-cdk-lib/aws-iot1click/README.md +27 -0
  182. package/iac/node_modules/aws-cdk-lib/aws-iotanalytics/README.md +27 -0
  183. package/iac/node_modules/aws-cdk-lib/aws-iotcoredeviceadvisor/README.md +27 -0
  184. package/iac/node_modules/aws-cdk-lib/aws-iotevents/README.md +32 -0
  185. package/iac/node_modules/aws-cdk-lib/aws-iotfleethub/README.md +27 -0
  186. package/iac/node_modules/aws-cdk-lib/aws-iotsitewise/README.md +27 -0
  187. package/iac/node_modules/aws-cdk-lib/aws-iotthingsgraph/README.md +27 -0
  188. package/iac/node_modules/aws-cdk-lib/aws-iottwinmaker/README.md +27 -0
  189. package/iac/node_modules/aws-cdk-lib/aws-iotwireless/README.md +27 -0
  190. package/iac/node_modules/aws-cdk-lib/aws-ivs/README.md +32 -0
  191. package/iac/node_modules/aws-cdk-lib/aws-kafkaconnect/README.md +27 -0
  192. package/iac/node_modules/aws-cdk-lib/aws-kendra/README.md +27 -0
  193. package/iac/node_modules/aws-cdk-lib/aws-kinesis/README.md +188 -0
  194. package/iac/node_modules/aws-cdk-lib/aws-kinesisanalytics/README.md +27 -0
  195. package/iac/node_modules/aws-cdk-lib/aws-kinesisanalyticsv2/README.md +27 -0
  196. package/iac/node_modules/aws-cdk-lib/aws-kinesisfirehose/README.md +32 -0
  197. package/iac/node_modules/aws-cdk-lib/aws-kinesisvideo/README.md +27 -0
  198. package/iac/node_modules/aws-cdk-lib/aws-kms/README.md +209 -0
  199. package/iac/node_modules/aws-cdk-lib/aws-lakeformation/README.md +27 -0
  200. package/iac/node_modules/aws-cdk-lib/aws-lambda/README.md +985 -0
  201. package/iac/node_modules/aws-cdk-lib/aws-lambda-destinations/README.md +147 -0
  202. package/iac/node_modules/aws-cdk-lib/aws-lambda-event-sources/README.md +281 -0
  203. package/iac/node_modules/aws-cdk-lib/aws-lambda-nodejs/README.md +317 -0
  204. package/iac/node_modules/aws-cdk-lib/aws-lex/README.md +27 -0
  205. package/iac/node_modules/aws-cdk-lib/aws-licensemanager/README.md +27 -0
  206. package/iac/node_modules/aws-cdk-lib/aws-lightsail/README.md +27 -0
  207. package/iac/node_modules/aws-cdk-lib/aws-location/README.md +27 -0
  208. package/iac/node_modules/aws-cdk-lib/aws-logs/README.md +322 -0
  209. package/iac/node_modules/aws-cdk-lib/aws-logs-destinations/README.md +7 -0
  210. package/iac/node_modules/aws-cdk-lib/aws-lookoutequipment/README.md +27 -0
  211. package/iac/node_modules/aws-cdk-lib/aws-lookoutmetrics/README.md +27 -0
  212. package/iac/node_modules/aws-cdk-lib/aws-lookoutvision/README.md +27 -0
  213. package/iac/node_modules/aws-cdk-lib/aws-m2/README.md +27 -0
  214. package/iac/node_modules/aws-cdk-lib/aws-macie/README.md +27 -0
  215. package/iac/node_modules/aws-cdk-lib/aws-managedblockchain/README.md +27 -0
  216. package/iac/node_modules/aws-cdk-lib/aws-mediaconnect/README.md +27 -0
  217. package/iac/node_modules/aws-cdk-lib/aws-mediaconvert/README.md +27 -0
  218. package/iac/node_modules/aws-cdk-lib/aws-medialive/README.md +27 -0
  219. package/iac/node_modules/aws-cdk-lib/aws-mediapackage/README.md +27 -0
  220. package/iac/node_modules/aws-cdk-lib/aws-mediastore/README.md +27 -0
  221. package/iac/node_modules/aws-cdk-lib/aws-mediatailor/README.md +27 -0
  222. package/iac/node_modules/aws-cdk-lib/aws-memorydb/README.md +27 -0
  223. package/iac/node_modules/aws-cdk-lib/aws-msk/README.md +32 -0
  224. package/iac/node_modules/aws-cdk-lib/aws-mwaa/README.md +27 -0
  225. package/iac/node_modules/aws-cdk-lib/aws-neptune/README.md +32 -0
  226. package/iac/node_modules/aws-cdk-lib/aws-networkfirewall/README.md +27 -0
  227. package/iac/node_modules/aws-cdk-lib/aws-networkmanager/README.md +27 -0
  228. package/iac/node_modules/aws-cdk-lib/aws-nimblestudio/README.md +27 -0
  229. package/iac/node_modules/aws-cdk-lib/aws-opensearchservice/README.md +378 -0
  230. package/iac/node_modules/aws-cdk-lib/aws-opsworks/README.md +27 -0
  231. package/iac/node_modules/aws-cdk-lib/aws-opsworkscm/README.md +27 -0
  232. package/iac/node_modules/aws-cdk-lib/aws-panorama/README.md +27 -0
  233. package/iac/node_modules/aws-cdk-lib/aws-personalize/README.md +27 -0
  234. package/iac/node_modules/aws-cdk-lib/aws-pinpoint/README.md +27 -0
  235. package/iac/node_modules/aws-cdk-lib/aws-pinpointemail/README.md +27 -0
  236. package/iac/node_modules/aws-cdk-lib/aws-qldb/README.md +27 -0
  237. package/iac/node_modules/aws-cdk-lib/aws-quicksight/README.md +27 -0
  238. package/iac/node_modules/aws-cdk-lib/aws-ram/README.md +27 -0
  239. package/iac/node_modules/aws-cdk-lib/aws-rds/README.md +704 -0
  240. package/iac/node_modules/aws-cdk-lib/aws-redshift/README.md +32 -0
  241. package/iac/node_modules/aws-cdk-lib/aws-redshiftserverless/README.md +27 -0
  242. package/iac/node_modules/aws-cdk-lib/aws-refactorspaces/README.md +27 -0
  243. package/iac/node_modules/aws-cdk-lib/aws-rekognition/README.md +27 -0
  244. package/iac/node_modules/aws-cdk-lib/aws-resiliencehub/README.md +27 -0
  245. package/iac/node_modules/aws-cdk-lib/aws-resourcegroups/README.md +27 -0
  246. package/iac/node_modules/aws-cdk-lib/aws-robomaker/README.md +27 -0
  247. package/iac/node_modules/aws-cdk-lib/aws-route53/README.md +281 -0
  248. package/iac/node_modules/aws-cdk-lib/aws-route53-patterns/README.md +45 -0
  249. package/iac/node_modules/aws-cdk-lib/aws-route53-targets/README.md +181 -0
  250. package/iac/node_modules/aws-cdk-lib/aws-route53recoverycontrol/README.md +27 -0
  251. package/iac/node_modules/aws-cdk-lib/aws-route53recoveryreadiness/README.md +27 -0
  252. package/iac/node_modules/aws-cdk-lib/aws-route53resolver/README.md +32 -0
  253. package/iac/node_modules/aws-cdk-lib/aws-rum/README.md +27 -0
  254. package/iac/node_modules/aws-cdk-lib/aws-s3/README.md +581 -0
  255. package/iac/node_modules/aws-cdk-lib/aws-s3-assets/README.md +179 -0
  256. package/iac/node_modules/aws-cdk-lib/aws-s3-deployment/README.md +349 -0
  257. package/iac/node_modules/aws-cdk-lib/aws-s3-notifications/README.md +46 -0
  258. package/iac/node_modules/aws-cdk-lib/aws-s3objectlambda/README.md +32 -0
  259. package/iac/node_modules/aws-cdk-lib/aws-s3outposts/README.md +27 -0
  260. package/iac/node_modules/aws-cdk-lib/aws-sagemaker/README.md +27 -0
  261. package/iac/node_modules/aws-cdk-lib/aws-sam/README.md +27 -0
  262. package/iac/node_modules/aws-cdk-lib/aws-sdb/README.md +27 -0
  263. package/iac/node_modules/aws-cdk-lib/aws-secretsmanager/README.md +285 -0
  264. package/iac/node_modules/aws-cdk-lib/aws-securityhub/README.md +27 -0
  265. package/iac/node_modules/aws-cdk-lib/aws-servicecatalog/README.md +491 -0
  266. package/iac/node_modules/aws-cdk-lib/aws-servicecatalogappregistry/README.md +32 -0
  267. package/iac/node_modules/aws-cdk-lib/aws-servicediscovery/README.md +45 -0
  268. package/iac/node_modules/aws-cdk-lib/aws-ses/README.md +194 -0
  269. package/iac/node_modules/aws-cdk-lib/aws-ses-actions/README.md +16 -0
  270. package/iac/node_modules/aws-cdk-lib/aws-signer/README.md +41 -0
  271. package/iac/node_modules/aws-cdk-lib/aws-sns/README.md +184 -0
  272. package/iac/node_modules/aws-cdk-lib/aws-sns-subscriptions/README.md +120 -0
  273. package/iac/node_modules/aws-cdk-lib/aws-sqs/README.md +57 -0
  274. package/iac/node_modules/aws-cdk-lib/aws-ssm/README.md +99 -0
  275. package/iac/node_modules/aws-cdk-lib/aws-ssmcontacts/README.md +27 -0
  276. package/iac/node_modules/aws-cdk-lib/aws-ssmincidents/README.md +27 -0
  277. package/iac/node_modules/aws-cdk-lib/aws-sso/README.md +27 -0
  278. package/iac/node_modules/aws-cdk-lib/aws-stepfunctions/README.md +884 -0
  279. package/iac/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/README.md +1288 -0
  280. package/iac/node_modules/aws-cdk-lib/aws-supportapp/README.md +27 -0
  281. package/iac/node_modules/aws-cdk-lib/aws-synthetics/README.md +32 -0
  282. package/iac/node_modules/aws-cdk-lib/aws-timestream/README.md +27 -0
  283. package/iac/node_modules/aws-cdk-lib/aws-transfer/README.md +27 -0
  284. package/iac/node_modules/aws-cdk-lib/aws-voiceid/README.md +27 -0
  285. package/iac/node_modules/aws-cdk-lib/aws-waf/README.md +27 -0
  286. package/iac/node_modules/aws-cdk-lib/aws-wafregional/README.md +27 -0
  287. package/iac/node_modules/aws-cdk-lib/aws-wafv2/README.md +27 -0
  288. package/iac/node_modules/aws-cdk-lib/aws-wisdom/README.md +27 -0
  289. package/iac/node_modules/aws-cdk-lib/aws-workspaces/README.md +27 -0
  290. package/iac/node_modules/aws-cdk-lib/aws-xray/README.md +27 -0
  291. package/iac/node_modules/aws-cdk-lib/cloud-assembly-schema/README.md +55 -0
  292. package/iac/node_modules/aws-cdk-lib/cloud-assembly-schema/schema/README.md +5 -0
  293. package/iac/node_modules/aws-cdk-lib/cloudformation-include/README.md +466 -0
  294. package/iac/node_modules/aws-cdk-lib/core/README.md +1078 -0
  295. package/iac/node_modules/aws-cdk-lib/custom-resources/README.md +624 -0
  296. package/iac/node_modules/aws-cdk-lib/cx-api/README.md +98 -0
  297. package/iac/node_modules/aws-cdk-lib/lambda-layer-awscli/README.md +19 -0
  298. package/iac/node_modules/aws-cdk-lib/lambda-layer-kubectl/README.md +20 -0
  299. package/iac/node_modules/aws-cdk-lib/lambda-layer-node-proxy-agent/README.md +18 -0
  300. package/iac/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/LICENSE.md +206 -0
  301. package/iac/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/README.md +261 -0
  302. package/iac/node_modules/aws-cdk-lib/node_modules/at-least-node/LICENSE +6 -0
  303. package/iac/node_modules/aws-cdk-lib/node_modules/at-least-node/README.md +25 -0
  304. package/iac/node_modules/aws-cdk-lib/node_modules/balanced-match/LICENSE.md +21 -0
  305. package/iac/node_modules/aws-cdk-lib/node_modules/balanced-match/README.md +97 -0
  306. package/iac/node_modules/aws-cdk-lib/node_modules/brace-expansion/LICENSE +21 -0
  307. package/iac/node_modules/aws-cdk-lib/node_modules/brace-expansion/README.md +129 -0
  308. package/iac/node_modules/aws-cdk-lib/node_modules/case/LICENSE +22 -0
  309. package/iac/node_modules/aws-cdk-lib/node_modules/case/README.md +139 -0
  310. package/iac/node_modules/aws-cdk-lib/node_modules/case/dist/Case.min.js.map +1 -0
  311. package/iac/node_modules/aws-cdk-lib/node_modules/case/dist/Case.plus.min.js.map +1 -0
  312. package/iac/node_modules/aws-cdk-lib/node_modules/concat-map/LICENSE +18 -0
  313. package/iac/node_modules/aws-cdk-lib/node_modules/concat-map/README.markdown +62 -0
  314. package/iac/node_modules/aws-cdk-lib/node_modules/fs-extra/LICENSE +15 -0
  315. package/iac/node_modules/aws-cdk-lib/node_modules/fs-extra/README.md +264 -0
  316. package/iac/node_modules/aws-cdk-lib/node_modules/graceful-fs/LICENSE +15 -0
  317. package/iac/node_modules/aws-cdk-lib/node_modules/graceful-fs/README.md +143 -0
  318. package/iac/node_modules/aws-cdk-lib/node_modules/ignore/README.md +412 -0
  319. package/iac/node_modules/aws-cdk-lib/node_modules/jsonfile/LICENSE +15 -0
  320. package/iac/node_modules/aws-cdk-lib/node_modules/jsonfile/README.md +230 -0
  321. package/iac/node_modules/aws-cdk-lib/node_modules/jsonschema/LICENSE +21 -0
  322. package/iac/node_modules/aws-cdk-lib/node_modules/jsonschema/README.md +421 -0
  323. package/iac/node_modules/aws-cdk-lib/node_modules/lru-cache/LICENSE +15 -0
  324. package/iac/node_modules/aws-cdk-lib/node_modules/lru-cache/README.md +166 -0
  325. package/iac/node_modules/aws-cdk-lib/node_modules/minimatch/LICENSE +15 -0
  326. package/iac/node_modules/aws-cdk-lib/node_modules/minimatch/README.md +230 -0
  327. package/iac/node_modules/aws-cdk-lib/node_modules/punycode/README.md +122 -0
  328. package/iac/node_modules/aws-cdk-lib/node_modules/semver/LICENSE +15 -0
  329. package/iac/node_modules/aws-cdk-lib/node_modules/semver/README.md +568 -0
  330. package/iac/node_modules/aws-cdk-lib/node_modules/universalify/LICENSE +20 -0
  331. package/iac/node_modules/aws-cdk-lib/node_modules/universalify/README.md +76 -0
  332. package/iac/node_modules/aws-cdk-lib/node_modules/yallist/LICENSE +15 -0
  333. package/iac/node_modules/aws-cdk-lib/node_modules/yallist/README.md +204 -0
  334. package/iac/node_modules/aws-cdk-lib/node_modules/yaml/LICENSE +13 -0
  335. package/iac/node_modules/aws-cdk-lib/node_modules/yaml/README.md +127 -0
  336. package/iac/node_modules/aws-cdk-lib/pipelines/README.md +1573 -0
  337. package/iac/node_modules/aws-cdk-lib/region-info/README.md +84 -0
  338. package/iac/node_modules/aws-cdk-lib/triggers/README.md +86 -0
  339. package/iac/node_modules/balanced-match/LICENSE.md +21 -0
  340. package/iac/node_modules/balanced-match/README.md +97 -0
  341. package/iac/node_modules/brace-expansion/LICENSE +21 -0
  342. package/iac/node_modules/brace-expansion/README.md +129 -0
  343. package/iac/node_modules/buffer-from/LICENSE +21 -0
  344. package/iac/node_modules/buffer-from/readme.md +69 -0
  345. package/iac/node_modules/case/LICENSE +22 -0
  346. package/iac/node_modules/case/README.md +139 -0
  347. package/iac/node_modules/case/dist/Case.min.js.map +1 -0
  348. package/iac/node_modules/case/dist/Case.plus.min.js.map +1 -0
  349. package/iac/node_modules/chalk/license +9 -0
  350. package/iac/node_modules/chalk/node_modules/ansi-styles/license +9 -0
  351. package/iac/node_modules/chalk/node_modules/ansi-styles/readme.md +152 -0
  352. package/iac/node_modules/chalk/readme.md +341 -0
  353. package/iac/node_modules/color-convert/LICENSE +21 -0
  354. package/iac/node_modules/color-convert/README.md +68 -0
  355. package/iac/node_modules/color-name/LICENSE +8 -0
  356. package/iac/node_modules/color-name/README.md +11 -0
  357. package/iac/node_modules/concat-map/LICENSE +18 -0
  358. package/iac/node_modules/concat-map/README.markdown +62 -0
  359. package/iac/node_modules/constructs/LICENSE +202 -0
  360. package/iac/node_modules/constructs/README.md +28 -0
  361. package/iac/node_modules/create-require/LICENSE +25 -0
  362. package/iac/node_modules/create-require/README.md +46 -0
  363. package/iac/node_modules/diff/LICENSE +31 -0
  364. package/iac/node_modules/diff/README.md +207 -0
  365. package/iac/node_modules/diff-sequences/LICENSE +21 -0
  366. package/iac/node_modules/diff-sequences/README.md +404 -0
  367. package/iac/node_modules/fs-extra/LICENSE +15 -0
  368. package/iac/node_modules/fs-extra/README.md +264 -0
  369. package/iac/node_modules/fsevents/LICENSE +22 -0
  370. package/iac/node_modules/fsevents/README.md +83 -0
  371. package/iac/node_modules/graceful-fs/LICENSE +15 -0
  372. package/iac/node_modules/graceful-fs/README.md +143 -0
  373. package/iac/node_modules/has-flag/license +9 -0
  374. package/iac/node_modules/has-flag/readme.md +89 -0
  375. package/iac/node_modules/ignore/README.md +412 -0
  376. package/iac/node_modules/jest-diff/LICENSE +21 -0
  377. package/iac/node_modules/jest-diff/README.md +671 -0
  378. package/iac/node_modules/jest-get-type/LICENSE +21 -0
  379. package/iac/node_modules/jest-matcher-utils/LICENSE +21 -0
  380. package/iac/node_modules/jest-matcher-utils/README.md +24 -0
  381. package/iac/node_modules/jsonfile/LICENSE +15 -0
  382. package/iac/node_modules/jsonfile/README.md +230 -0
  383. package/iac/node_modules/jsonschema/LICENSE +21 -0
  384. package/iac/node_modules/jsonschema/README.md +421 -0
  385. package/iac/node_modules/lru-cache/LICENSE +15 -0
  386. package/iac/node_modules/lru-cache/README.md +166 -0
  387. package/iac/node_modules/make-error/LICENSE +5 -0
  388. package/iac/node_modules/make-error/README.md +112 -0
  389. package/iac/node_modules/minimatch/LICENSE +15 -0
  390. package/iac/node_modules/minimatch/README.md +230 -0
  391. package/iac/node_modules/pretty-format/LICENSE +21 -0
  392. package/iac/node_modules/pretty-format/README.md +458 -0
  393. package/iac/node_modules/punycode/README.md +122 -0
  394. package/iac/node_modules/react-is/LICENSE +21 -0
  395. package/iac/node_modules/react-is/README.md +104 -0
  396. package/iac/node_modules/semver/LICENSE +15 -0
  397. package/iac/node_modules/semver/README.md +568 -0
  398. package/iac/node_modules/source-map/LICENSE +28 -0
  399. package/iac/node_modules/source-map/README.md +742 -0
  400. package/iac/node_modules/source-map/dist/source-map.min.js.map +1 -0
  401. package/iac/node_modules/source-map-support/LICENSE.md +21 -0
  402. package/iac/node_modules/source-map-support/README.md +284 -0
  403. package/iac/node_modules/supports-color/license +9 -0
  404. package/iac/node_modules/supports-color/readme.md +76 -0
  405. package/iac/node_modules/ts-node/LICENSE +21 -0
  406. package/iac/node_modules/ts-node/README.md +1442 -0
  407. package/iac/node_modules/ts-node/dist/bin-cwd.js.map +1 -0
  408. package/iac/node_modules/ts-node/dist/bin-esm.js.map +1 -0
  409. package/iac/node_modules/ts-node/dist/bin-script-deprecated.js.map +1 -0
  410. package/iac/node_modules/ts-node/dist/bin-script.js.map +1 -0
  411. package/iac/node_modules/ts-node/dist/bin-transpile.js.map +1 -0
  412. package/iac/node_modules/ts-node/dist/bin.js.map +1 -0
  413. package/iac/node_modules/ts-node/dist/child/argv-payload.js.map +1 -0
  414. package/iac/node_modules/ts-node/dist/child/child-entrypoint.js.map +1 -0
  415. package/iac/node_modules/ts-node/dist/child/child-loader.js.map +1 -0
  416. package/iac/node_modules/ts-node/dist/child/child-require.js.map +1 -0
  417. package/iac/node_modules/ts-node/dist/child/spawn-child.js.map +1 -0
  418. package/iac/node_modules/ts-node/dist/cjs-resolve-hooks.js.map +1 -0
  419. package/iac/node_modules/ts-node/dist/configuration.js.map +1 -0
  420. package/iac/node_modules/ts-node/dist/esm.js.map +1 -0
  421. package/iac/node_modules/ts-node/dist/file-extensions.js.map +1 -0
  422. package/iac/node_modules/ts-node/dist/index.js.map +1 -0
  423. package/iac/node_modules/ts-node/dist/module-type-classifier.js.map +1 -0
  424. package/iac/node_modules/ts-node/dist/node-module-type-classifier.js.map +1 -0
  425. package/iac/node_modules/ts-node/dist/repl.js.map +1 -0
  426. package/iac/node_modules/ts-node/dist/resolver-functions.js.map +1 -0
  427. package/iac/node_modules/ts-node/dist/transpilers/swc.js.map +1 -0
  428. package/iac/node_modules/ts-node/dist/transpilers/types.js.map +1 -0
  429. package/iac/node_modules/ts-node/dist/ts-compiler-types.js.map +1 -0
  430. package/iac/node_modules/ts-node/dist/ts-internals.js.map +1 -0
  431. package/iac/node_modules/ts-node/dist/ts-transpile-module.js.map +1 -0
  432. package/iac/node_modules/ts-node/dist/tsconfig-schema.js.map +1 -0
  433. package/iac/node_modules/ts-node/dist/tsconfigs.js.map +1 -0
  434. package/iac/node_modules/ts-node/dist/util.js.map +1 -0
  435. package/iac/node_modules/ts-node/dist-raw/README.md +36 -0
  436. package/iac/node_modules/typescript/LICENSE.txt +55 -0
  437. package/iac/node_modules/typescript/README.md +104 -0
  438. package/iac/node_modules/typescript/lib/README.md +5 -0
  439. package/iac/node_modules/universalify/LICENSE +20 -0
  440. package/iac/node_modules/universalify/README.md +76 -0
  441. package/iac/node_modules/v8-compile-cache-lib/LICENSE +21 -0
  442. package/iac/node_modules/v8-compile-cache-lib/README.md +60 -0
  443. package/iac/node_modules/yallist/LICENSE +15 -0
  444. package/iac/node_modules/yallist/README.md +204 -0
  445. package/iac/node_modules/yaml/LICENSE +13 -0
  446. package/iac/node_modules/yaml/README.md +127 -0
  447. package/iac/node_modules/yn/license +9 -0
  448. package/iac/node_modules/yn/readme.md +83 -0
  449. package/index.d.ts +1 -0
  450. package/index.js +18 -0
  451. package/index.js.map +1 -0
  452. package/package.json +26 -5
  453. package/react/Edit.d.ts +3 -0
  454. package/react/Edit.js +10 -0
  455. package/react/Edit.js.map +1 -0
  456. package/react/index.d.ts +1 -0
  457. package/react/index.js +18 -0
  458. package/react/index.js.map +1 -0
  459. package/src/material-symbols.d.ts +4 -0
@@ -0,0 +1,1573 @@
1
+ # CDK Pipelines
2
+
3
+
4
+ A construct library for painless Continuous Delivery of CDK applications.
5
+
6
+ CDK Pipelines is an *opinionated construct library*. It is purpose-built to
7
+ deploy one or more copies of your CDK applications using CloudFormation with a
8
+ minimal amount of effort on your part. It is *not* intended to support arbitrary
9
+ deployment pipelines, and very specifically it is not built to use CodeDeploy to
10
+ applications to instances, or deploy your custom-built ECR images to an ECS
11
+ cluster directly: use CDK file assets with CloudFormation Init for instances, or
12
+ CDK container assets for ECS clusters instead.
13
+
14
+ Give the CDK Pipelines way of doing things a shot first: you might find it does
15
+ everything you need. If you want or need more control, we recommend you drop
16
+ down to using the `aws-codepipeline` construct library directly.
17
+
18
+ > This module contains two sets of APIs: an **original** and a **modern** version of
19
+ CDK Pipelines. The *modern* API has been updated to be easier to work with and
20
+ customize, and will be the preferred API going forward. The *original* version
21
+ of the API is still available for backwards compatibility, but we recommend migrating
22
+ to the new version if possible.
23
+ >
24
+ > Compared to the original API, the modern API: has more sensible defaults; is
25
+ > more flexible; supports parallel deployments; supports multiple synth inputs;
26
+ > allows more control of CodeBuild project generation; supports deployment
27
+ > engines other than CodePipeline.
28
+ >
29
+ > The README for the original API, as well as a migration guide, can be found in [our GitHub repository](https://github.com/aws/aws-cdk/blob/main/packages/@aws-cdk/pipelines/ORIGINAL_API.md).
30
+
31
+ ## At a glance
32
+
33
+ Deploying your application continuously starts by defining a
34
+ `MyApplicationStage`, a subclass of `Stage` that contains the stacks that make
35
+ up a single copy of your application.
36
+
37
+ You then define a `Pipeline`, instantiate as many instances of
38
+ `MyApplicationStage` as you want for your test and production environments, with
39
+ different parameters for each, and calling `pipeline.addStage()` for each of
40
+ them. You can deploy to the same account and Region, or to a different one,
41
+ with the same amount of code. The *CDK Pipelines* library takes care of the
42
+ details.
43
+
44
+ CDK Pipelines supports multiple *deployment engines* (see
45
+ [Using a different deployment engine](#using-a-different-deployment-engine)),
46
+ and comes with a deployment engine that deploys CDK apps using AWS CodePipeline.
47
+ To use the CodePipeline engine, define a `CodePipeline` construct. The following
48
+ example creates a CodePipeline that deploys an application from GitHub:
49
+
50
+ ```ts
51
+ /** The stacks for our app are minimally defined here. The internals of these
52
+ * stacks aren't important, except that DatabaseStack exposes an attribute
53
+ * "table" for a database table it defines, and ComputeStack accepts a reference
54
+ * to this table in its properties.
55
+ */
56
+ class DatabaseStack extends Stack {
57
+ public readonly table: dynamodb.Table;
58
+
59
+ constructor(scope: Construct, id: string) {
60
+ super(scope, id);
61
+ this.table = new dynamodb.Table(this, 'Table', {
62
+ partitionKey: { name: 'id', type: dynamodb.AttributeType.STRING }
63
+ });
64
+ }
65
+ }
66
+
67
+ interface ComputeProps {
68
+ readonly table: dynamodb.Table;
69
+ }
70
+
71
+ class ComputeStack extends Stack {
72
+ constructor(scope: Construct, id: string, props: ComputeProps) {
73
+ super(scope, id);
74
+ }
75
+ }
76
+
77
+ /**
78
+ * Stack to hold the pipeline
79
+ */
80
+ class MyPipelineStack extends Stack {
81
+ constructor(scope: Construct, id: string, props?: StackProps) {
82
+ super(scope, id, props);
83
+
84
+ const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
85
+ synth: new pipelines.ShellStep('Synth', {
86
+ // Use a connection created using the AWS console to authenticate to GitHub
87
+ // Other sources are available.
88
+ input: pipelines.CodePipelineSource.connection('my-org/my-app', 'main', {
89
+ connectionArn: 'arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41', // Created using the AWS console * });',
90
+ }),
91
+ commands: [
92
+ 'npm ci',
93
+ 'npm run build',
94
+ 'npx cdk synth',
95
+ ],
96
+ }),
97
+ });
98
+
99
+ // 'MyApplication' is defined below. Call `addStage` as many times as
100
+ // necessary with any account and region (may be different from the
101
+ // pipeline's).
102
+ pipeline.addStage(new MyApplication(this, 'Prod', {
103
+ env: {
104
+ account: '123456789012',
105
+ region: 'eu-west-1',
106
+ },
107
+ }));
108
+ }
109
+ }
110
+
111
+ /**
112
+ * Your application
113
+ *
114
+ * May consist of one or more Stacks (here, two)
115
+ *
116
+ * By declaring our DatabaseStack and our ComputeStack inside a Stage,
117
+ * we make sure they are deployed together, or not at all.
118
+ */
119
+ class MyApplication extends Stage {
120
+ constructor(scope: Construct, id: string, props?: StageProps) {
121
+ super(scope, id, props);
122
+
123
+ const dbStack = new DatabaseStack(this, 'Database');
124
+ new ComputeStack(this, 'Compute', {
125
+ table: dbStack.table,
126
+ });
127
+ }
128
+ }
129
+
130
+ // In your main file
131
+ new MyPipelineStack(this, 'PipelineStack', {
132
+ env: {
133
+ account: '123456789012',
134
+ region: 'eu-west-1',
135
+ }
136
+ });
137
+ ```
138
+
139
+ The pipeline is **self-mutating**, which means that if you add new
140
+ application stages in the source code, or new stacks to `MyApplication`, the
141
+ pipeline will automatically reconfigure itself to deploy those new stages and
142
+ stacks.
143
+
144
+ (Note that you have to *bootstrap* all environments before the above code
145
+ will work, and switch on "Modern synthesis" if you are using
146
+ CDKv1. See the section **CDK Environment Bootstrapping** below for
147
+ more information).
148
+
149
+ ## Provisioning the pipeline
150
+
151
+ To provision the pipeline you have defined, make sure the target environment
152
+ has been bootstrapped (see below), and then execute deploying the
153
+ `PipelineStack` *once*. Afterwards, the pipeline will keep itself up-to-date.
154
+
155
+ > **Important**: be sure to `git commit` and `git push` before deploying the
156
+ > Pipeline stack using `cdk deploy`!
157
+ >
158
+ > The reason is that the pipeline will start deploying and self-mutating
159
+ > right away based on the sources in the repository, so the sources it finds
160
+ > in there should be the ones you want it to find.
161
+
162
+ Run the following commands to get the pipeline going:
163
+
164
+ ```console
165
+ $ git commit -a
166
+ $ git push
167
+ $ cdk deploy PipelineStack
168
+ ```
169
+
170
+ Administrative permissions to the account are only necessary up until
171
+ this point. We recommend you remove access to these credentials after doing this.
172
+
173
+ ### Working on the pipeline
174
+
175
+ The self-mutation feature of the Pipeline might at times get in the way
176
+ of the pipeline development workflow. Each change to the pipeline must be pushed
177
+ to git, otherwise, after the pipeline was updated using `cdk deploy`, it will
178
+ automatically revert to the state found in git.
179
+
180
+ To make the development more convenient, the self-mutation feature can be turned
181
+ off temporarily, by passing `selfMutation: false` property, example:
182
+
183
+ ```ts
184
+ // Modern API
185
+ const modernPipeline = new pipelines.CodePipeline(this, 'Pipeline', {
186
+ selfMutation: false,
187
+ synth: new pipelines.ShellStep('Synth', {
188
+ input: pipelines.CodePipelineSource.connection('my-org/my-app', 'main', {
189
+ connectionArn: 'arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41', // Created using the AWS console * });',
190
+ }),
191
+ commands: [
192
+ 'npm ci',
193
+ 'npm run build',
194
+ 'npx cdk synth',
195
+ ],
196
+ }),
197
+ });
198
+
199
+ // Original API
200
+ const cloudAssemblyArtifact = new codepipeline.Artifact();
201
+ const originalPipeline = new pipelines.CdkPipeline(this, 'Pipeline', {
202
+ selfMutating: false,
203
+ cloudAssemblyArtifact,
204
+ });
205
+ ```
206
+
207
+ ## Definining the pipeline
208
+
209
+ This section of the documentation describes the AWS CodePipeline engine,
210
+ which comes with this library. If you want to use a different deployment
211
+ engine, read the section
212
+ [Using a different deployment engine](#using-a-different-deployment-engine)below.
213
+
214
+ ### Synth and sources
215
+
216
+ To define a pipeline, instantiate a `CodePipeline` construct from the
217
+ `@aws-cdk/pipelines` module. It takes one argument, a `synth` step, which is
218
+ expected to produce the CDK Cloud Assembly as its single output (the contents of
219
+ the `cdk.out` directory after running `cdk synth`). "Steps" are arbitrary
220
+ actions in the pipeline, typically used to run scripts or commands.
221
+
222
+ For the synth, use a `ShellStep` and specify the commands necessary to install
223
+ dependencies, the CDK CLI, build your project and run `cdk synth`; the specific
224
+ commands required will depend on the programming language you are using. For a
225
+ typical NPM-based project, the synth will look like this:
226
+
227
+ ```ts
228
+ declare const source: pipelines.IFileSetProducer; // the repository source
229
+
230
+ const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
231
+ synth: new pipelines.ShellStep('Synth', {
232
+ input: source,
233
+ commands: [
234
+ 'npm ci',
235
+ 'npm run build',
236
+ 'npx cdk synth',
237
+ ],
238
+ }),
239
+ });
240
+ ```
241
+
242
+ The pipeline assumes that your `ShellStep` will produce a `cdk.out`
243
+ directory in the root, containing the CDK cloud assembly. If your
244
+ CDK project lives in a subdirectory, be sure to adjust the
245
+ `primaryOutputDirectory` to match:
246
+
247
+ ```ts
248
+ declare const source: pipelines.IFileSetProducer; // the repository source
249
+
250
+ const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
251
+ synth: new pipelines.ShellStep('Synth', {
252
+ input: source,
253
+ commands: [
254
+ 'cd mysubdir',
255
+ 'npm ci',
256
+ 'npm run build',
257
+ 'npx cdk synth',
258
+ ],
259
+ primaryOutputDirectory: 'mysubdir/cdk.out',
260
+ }),
261
+ });
262
+ ```
263
+
264
+ The underlying `@aws-cdk/aws-codepipeline.Pipeline` construct will be produced
265
+ when `app.synth()` is called. You can also force it to be produced
266
+ earlier by calling `pipeline.buildPipeline()`. After you've called
267
+ that method, you can inspect the constructs that were produced by
268
+ accessing the properties of the `pipeline` object.
269
+
270
+ #### Commands for other languages and package managers
271
+
272
+ The commands you pass to `new ShellStep` will be very similar to the commands
273
+ you run on your own workstation to install dependencies and synth your CDK
274
+ project. Here are some (non-exhaustive) examples for what those commands might
275
+ look like in a number of different situations.
276
+
277
+ For Yarn, the install commands are different:
278
+
279
+ ```ts
280
+ declare const source: pipelines.IFileSetProducer; // the repository source
281
+
282
+ const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
283
+ synth: new pipelines.ShellStep('Synth', {
284
+ input: source,
285
+ commands: [
286
+ 'yarn install --frozen-lockfile',
287
+ 'yarn build',
288
+ 'npx cdk synth',
289
+ ],
290
+ })
291
+ });
292
+ ```
293
+
294
+ For Python projects, remember to install the CDK CLI globally (as
295
+ there is no `package.json` to automatically install it for you):
296
+
297
+ ```ts
298
+ declare const source: pipelines.IFileSetProducer; // the repository source
299
+
300
+ const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
301
+ synth: new pipelines.ShellStep('Synth', {
302
+ input: source,
303
+ commands: [
304
+ 'pip install -r requirements.txt',
305
+ 'npm install -g aws-cdk',
306
+ 'cdk synth',
307
+ ],
308
+ })
309
+ });
310
+ ```
311
+
312
+ For Java projects, remember to install the CDK CLI globally (as
313
+ there is no `package.json` to automatically install it for you),
314
+ and the Maven compilation step is automatically executed for you
315
+ as you run `cdk synth`:
316
+
317
+ ```ts
318
+ declare const source: pipelines.IFileSetProducer; // the repository source
319
+
320
+ const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
321
+ synth: new pipelines.ShellStep('Synth', {
322
+ input: source,
323
+ commands: [
324
+ 'npm install -g aws-cdk',
325
+ 'cdk synth',
326
+ ],
327
+ })
328
+ });
329
+ ```
330
+
331
+ You can adapt these examples to your own situation.
332
+
333
+ #### Migrating from buildspec.yml files
334
+
335
+ You may currently have the build instructions for your CodeBuild Projects in a
336
+ `buildspec.yml` file in your source repository. In addition to your build
337
+ commands, the CodeBuild Project's buildspec also controls some information that
338
+ CDK Pipelines manages for you, like artifact identifiers, input artifact
339
+ locations, Docker authorization, and exported variables.
340
+
341
+ Since there is no way in general for CDK Pipelines to modify the file in your
342
+ resource repository, CDK Pipelines configures the BuildSpec directly on the
343
+ CodeBuild Project, instead of loading it from the `buildspec.yml` file.
344
+ This requires a pipeline self-mutation to update.
345
+
346
+ To avoid this, put your build instructions in a separate script, for example
347
+ `build.sh`, and call that script from the build `commands` array:
348
+
349
+ ```ts
350
+ declare const source: pipelines.IFileSetProducer;
351
+
352
+ const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
353
+ synth: new pipelines.ShellStep('Synth', {
354
+ input: source,
355
+ commands: [
356
+ // Abstract over doing the build
357
+ './build.sh',
358
+ ],
359
+ })
360
+ });
361
+ ```
362
+
363
+ Doing so keeps your exact build instructions in sync with your source code in
364
+ the source repository where it belongs, and provides a convenient build script
365
+ for developers at the same time.
366
+
367
+ #### CodePipeline Sources
368
+
369
+ In CodePipeline, *Sources* define where the source of your application lives.
370
+ When a change to the source is detected, the pipeline will start executing.
371
+ Source objects can be created by factory methods on the `CodePipelineSource` class:
372
+
373
+ ##### GitHub, GitHub Enterprise, BitBucket using a connection
374
+
375
+ The recommended way of connecting to GitHub or BitBucket is by using a *connection*.
376
+ You will first use the AWS Console to authenticate to the source control
377
+ provider, and then use the connection ARN in your pipeline definition:
378
+
379
+ ```ts
380
+ pipelines.CodePipelineSource.connection('org/repo', 'branch', {
381
+ connectionArn: 'arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41',
382
+ });
383
+ ```
384
+
385
+ ##### GitHub using OAuth
386
+
387
+ You can also authenticate to GitHub using a personal access token. This expects
388
+ that you've created a personal access token and stored it in Secrets Manager.
389
+ By default, the source object will look for a secret named **github-token**, but
390
+ you can change the name. The token should have the **repo** and **admin:repo_hook**
391
+ scopes.
392
+
393
+ ```ts
394
+ pipelines.CodePipelineSource.gitHub('org/repo', 'branch', {
395
+ // This is optional
396
+ authentication: cdk.SecretValue.secretsManager('my-token'),
397
+ });
398
+ ```
399
+
400
+ ##### CodeCommit
401
+
402
+ You can use a CodeCommit repository as the source. Either create or import
403
+ that the CodeCommit repository and then use `CodePipelineSource.codeCommit`
404
+ to reference it:
405
+
406
+ ```ts
407
+ const repository = codecommit.Repository.fromRepositoryName(this, 'Repository', 'my-repository');
408
+ pipelines.CodePipelineSource.codeCommit(repository, 'main');
409
+ ```
410
+
411
+ ##### S3
412
+
413
+ You can use a zip file in S3 as the source of the pipeline. The pipeline will be
414
+ triggered every time the file in S3 is changed:
415
+
416
+ ```ts
417
+ const bucket = s3.Bucket.fromBucketName(this, 'Bucket', 'my-bucket');
418
+ pipelines.CodePipelineSource.s3(bucket, 'my/source.zip');
419
+ ```
420
+
421
+ ##### ECR
422
+
423
+ You can use a Docker image in ECR as the source of the pipeline. The pipeline will be
424
+ triggered every time an image is pushed to ECR:
425
+
426
+ ```ts
427
+ const repository = new ecr.Repository(this, 'Repository');
428
+ pipelines.CodePipelineSource.ecr(repository);
429
+ ```
430
+
431
+ #### Additional inputs
432
+
433
+ `ShellStep` allows passing in more than one input: additional
434
+ inputs will be placed in the directories you specify. Any step that produces an
435
+ output file set can be used as an input, such as a `CodePipelineSource`, but
436
+ also other `ShellStep`:
437
+
438
+ ```ts
439
+ const prebuild = new pipelines.ShellStep('Prebuild', {
440
+ input: pipelines.CodePipelineSource.gitHub('myorg/repo1', 'main'),
441
+ primaryOutputDirectory: './build',
442
+ commands: ['./build.sh'],
443
+ });
444
+
445
+ const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
446
+ synth: new pipelines.ShellStep('Synth', {
447
+ input: pipelines.CodePipelineSource.gitHub('myorg/repo2', 'main'),
448
+ additionalInputs: {
449
+ 'subdir': pipelines.CodePipelineSource.gitHub('myorg/repo3', 'main'),
450
+ '../siblingdir': prebuild,
451
+ },
452
+
453
+ commands: ['./build.sh'],
454
+ })
455
+ });
456
+ ```
457
+
458
+ ### CDK application deployments
459
+
460
+ After you have defined the pipeline and the `synth` step, you can add one or
461
+ more CDK `Stages` which will be deployed to their target environments. To do
462
+ so, call `pipeline.addStage()` on the Stage object:
463
+
464
+ ```ts
465
+ declare const pipeline: pipelines.CodePipeline;
466
+ // Do this as many times as necessary with any account and region
467
+ // Account and region may different from the pipeline's.
468
+ pipeline.addStage(new MyApplicationStage(this, 'Prod', {
469
+ env: {
470
+ account: '123456789012',
471
+ region: 'eu-west-1',
472
+ }
473
+ }));
474
+ ```
475
+
476
+ CDK Pipelines will automatically discover all `Stacks` in the given `Stage`
477
+ object, determine their dependency order, and add appropriate actions to the
478
+ pipeline to publish the assets referenced in those stacks and deploy the stacks
479
+ in the right order.
480
+
481
+ If the `Stacks` are targeted at an environment in a different AWS account or
482
+ Region and that environment has been
483
+ [bootstrapped](https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html)
484
+ , CDK Pipelines will transparently make sure the IAM roles are set up
485
+ correctly and any requisite replication Buckets are created.
486
+
487
+ #### Deploying in parallel
488
+
489
+ By default, all applications added to CDK Pipelines by calling `addStage()` will
490
+ be deployed in sequence, one after the other. If you have a lot of stages, you can
491
+ speed up the pipeline by choosing to deploy some stages in parallel. You do this
492
+ by calling `addWave()` instead of `addStage()`: a *wave* is a set of stages that
493
+ are all deployed in parallel instead of sequentially. Waves themselves are still
494
+ deployed in sequence. For example, the following will deploy two copies of your
495
+ application to `eu-west-1` and `eu-central-1` in parallel:
496
+
497
+ ```ts
498
+ declare const pipeline: pipelines.CodePipeline;
499
+ const europeWave = pipeline.addWave('Europe');
500
+ europeWave.addStage(new MyApplicationStage(this, 'Ireland', {
501
+ env: { region: 'eu-west-1' }
502
+ }));
503
+ europeWave.addStage(new MyApplicationStage(this, 'Germany', {
504
+ env: { region: 'eu-central-1' }
505
+ }));
506
+ ```
507
+
508
+ #### Deploying to other accounts / encrypting the Artifact Bucket
509
+
510
+ CDK Pipelines can transparently deploy to other Regions and other accounts
511
+ (provided those target environments have been
512
+ [*bootstrapped*](https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html)).
513
+ However, deploying to another account requires one additional piece of
514
+ configuration: you need to enable `crossAccountKeys: true` when creating the
515
+ pipeline.
516
+
517
+ This will encrypt the artifact bucket(s), but incurs a cost for maintaining the
518
+ KMS key.
519
+
520
+ Example:
521
+
522
+ ```ts
523
+ const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
524
+ // Encrypt artifacts, required for cross-account deployments
525
+ crossAccountKeys: true,
526
+ synth: new pipelines.ShellStep('Synth', {
527
+ input: pipelines.CodePipelineSource.connection('my-org/my-app', 'main', {
528
+ connectionArn: 'arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41', // Created using the AWS console * });',
529
+ }),
530
+ commands: [
531
+ 'npm ci',
532
+ 'npm run build',
533
+ 'npx cdk synth',
534
+ ],
535
+ }),
536
+ });
537
+ ```
538
+
539
+ ### Validation
540
+
541
+ Every `addStage()` and `addWave()` command takes additional options. As part of these options,
542
+ you can specify `pre` and `post` steps, which are arbitrary steps that run before or after
543
+ the contents of the stage or wave, respectively. You can use these to add validations like
544
+ manual or automated gates to your pipeline. We recommend putting manual approval gates in the set of `pre` steps, and automated approval gates in
545
+ the set of `post` steps.
546
+
547
+ The following example shows both an automated approval in the form of a `ShellStep`, and
548
+ a manual approval in the form of a `ManualApprovalStep` added to the pipeline. Both must
549
+ pass in order to promote from the `PreProd` to the `Prod` environment:
550
+
551
+ ```ts
552
+ declare const pipeline: pipelines.CodePipeline;
553
+ const preprod = new MyApplicationStage(this, 'PreProd');
554
+ const prod = new MyApplicationStage(this, 'Prod');
555
+
556
+ pipeline.addStage(preprod, {
557
+ post: [
558
+ new pipelines.ShellStep('Validate Endpoint', {
559
+ commands: ['curl -Ssf https://my.webservice.com/'],
560
+ }),
561
+ ],
562
+ });
563
+ pipeline.addStage(prod, {
564
+ pre: [
565
+ new pipelines.ManualApprovalStep('PromoteToProd'),
566
+ ],
567
+ });
568
+ ```
569
+
570
+ You can also specify steps to be executed at the stack level. To achieve this, you can specify the stack and step via the `stackSteps` property:
571
+
572
+ ```ts
573
+ class MyStacksStage extends Stage {
574
+ public readonly stack1: Stack;
575
+ public readonly stack2: Stack;
576
+
577
+ constructor(scope: Construct, id: string, props?: StageProps) {
578
+ super(scope, id, props);
579
+ this.stack1 = new Stack(this, 'stack1');
580
+ this.stack2 = new Stack(this, 'stack2');
581
+ }
582
+ }
583
+
584
+ declare const pipeline: pipelines.CodePipeline;
585
+ const prod = new MyStacksStage(this, 'Prod');
586
+
587
+ pipeline.addStage(prod, {
588
+ stackSteps: [{
589
+ stack: prod.stack1,
590
+ pre: [new pipelines.ManualApprovalStep('Pre-Stack Check')], // Executed before stack is prepared
591
+ changeSet: [new pipelines.ManualApprovalStep('ChangeSet Approval')], // Executed after stack is prepared but before the stack is deployed
592
+ post: [new pipelines.ManualApprovalStep('Post-Deploy Check')], // Executed after stack is deployed
593
+ }, {
594
+ stack: prod.stack2,
595
+ post: [new pipelines.ManualApprovalStep('Post-Deploy Check')], // Executed after stack is deployed
596
+ }],
597
+ });
598
+ ```
599
+
600
+ If you specify multiple steps, they will execute in parallel by default. You can add dependencies between them
601
+ to if you wish to specify an order. To add a dependency, call `step.addStepDependency()`:
602
+
603
+ ```ts
604
+ const firstStep = new pipelines.ManualApprovalStep('A');
605
+ const secondStep = new pipelines.ManualApprovalStep('B');
606
+ secondStep.addStepDependency(firstStep);
607
+ ```
608
+
609
+ For convenience, `Step.sequence()` will take an array of steps and dependencies between adjacent steps,
610
+ so that the whole list executes in order:
611
+
612
+ ```ts
613
+ // Step A will depend on step B and step B will depend on step C
614
+ const orderedSteps = pipelines.Step.sequence([
615
+ new pipelines.ManualApprovalStep('A'),
616
+ new pipelines.ManualApprovalStep('B'),
617
+ new pipelines.ManualApprovalStep('C'),
618
+ ]);
619
+ ```
620
+
621
+ #### Using CloudFormation Stack Outputs in approvals
622
+
623
+ Because many CloudFormation deployments result in the generation of resources with unpredictable
624
+ names, validations have support for reading back CloudFormation Outputs after a deployment. This
625
+ makes it possible to pass (for example) the generated URL of a load balancer to the test set.
626
+
627
+ To use Stack Outputs, expose the `CfnOutput` object you're interested in, and
628
+ pass it to `envFromCfnOutputs` of the `ShellStep`:
629
+
630
+ ```ts
631
+ class MyOutputStage extends Stage {
632
+ public readonly loadBalancerAddress: CfnOutput;
633
+
634
+ constructor(scope: Construct, id: string, props?: StageProps) {
635
+ super(scope, id, props);
636
+ this.loadBalancerAddress = new CfnOutput(this, 'Output', {value: 'value'});
637
+ }
638
+ }
639
+
640
+ const lbApp = new MyOutputStage(this, 'MyApp');
641
+ declare const pipeline: pipelines.CodePipeline;
642
+ pipeline.addStage(lbApp, {
643
+ post: [
644
+ new pipelines.ShellStep('HitEndpoint', {
645
+ envFromCfnOutputs: {
646
+ // Make the load balancer address available as $URL inside the commands
647
+ URL: lbApp.loadBalancerAddress,
648
+ },
649
+ commands: ['curl -Ssf $URL'],
650
+ }),
651
+ ],
652
+ });
653
+ ```
654
+
655
+ #### Running scripts compiled during the synth step
656
+
657
+ As part of a validation, you probably want to run a test suite that's more
658
+ elaborate than what can be expressed in a couple of lines of shell script.
659
+ You can bring additional files into the shell script validation by supplying
660
+ the `input` or `additionalInputs` property of `ShellStep`. The input can
661
+ be produced by the `Synth` step, or come from a source or any other build
662
+ step.
663
+
664
+ Here's an example that captures an additional output directory in the synth
665
+ step and runs tests from there:
666
+
667
+ ```ts
668
+ declare const synth: pipelines.ShellStep;
669
+ const stage = new MyApplicationStage(this, 'MyApplication');
670
+ const pipeline = new pipelines.CodePipeline(this, 'Pipeline', { synth });
671
+
672
+ pipeline.addStage(stage, {
673
+ post: [
674
+ new pipelines.ShellStep('Approve', {
675
+ // Use the contents of the 'integ' directory from the synth step as the input
676
+ input: synth.addOutputDirectory('integ'),
677
+ commands: ['cd integ && ./run.sh'],
678
+ }),
679
+ ],
680
+ });
681
+ ```
682
+
683
+ ### Customizing CodeBuild Projects
684
+
685
+ CDK pipelines will generate CodeBuild projects for each `ShellStep` you use, and it
686
+ will also generate CodeBuild projects to publish assets and perform the self-mutation
687
+ of the pipeline. To control the various aspects of the CodeBuild projects that get
688
+ generated, use a `CodeBuildStep` instead of a `ShellStep`. This class has a number
689
+ of properties that allow you to customize various aspects of the projects:
690
+
691
+ ```ts
692
+ declare const vpc: ec2.Vpc;
693
+ declare const mySecurityGroup: ec2.SecurityGroup;
694
+ new pipelines.CodeBuildStep('Synth', {
695
+ // ...standard ShellStep props...
696
+ commands: [/* ... */],
697
+ env: { /* ... */ },
698
+
699
+ // If you are using a CodeBuildStep explicitly, set the 'cdk.out' directory
700
+ // to be the synth step's output.
701
+ primaryOutputDirectory: 'cdk.out',
702
+
703
+ // Control the name of the project
704
+ projectName: 'MyProject',
705
+
706
+ // Control parts of the BuildSpec other than the regular 'build' and 'install' commands
707
+ partialBuildSpec: codebuild.BuildSpec.fromObject({
708
+ version: '0.2',
709
+ // ...
710
+ }),
711
+
712
+ // Control the build environment
713
+ buildEnvironment: {
714
+ computeType: codebuild.ComputeType.LARGE,
715
+ },
716
+ timeout: Duration.minutes(90),
717
+
718
+ // Control Elastic Network Interface creation
719
+ vpc: vpc,
720
+ subnetSelection: { subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS },
721
+ securityGroups: [mySecurityGroup],
722
+
723
+ // Control caching
724
+ cache: codebuild.Cache.bucket(new s3.Bucket(this, 'Cache')),
725
+
726
+ // Additional policy statements for the execution role
727
+ rolePolicyStatements: [
728
+ new iam.PolicyStatement({ /* ... */ }),
729
+ ],
730
+ });
731
+ ```
732
+
733
+ You can also configure defaults for *all* CodeBuild projects by passing `codeBuildDefaults`,
734
+ or just for the synth, asset publishing, and self-mutation projects by passing `synthCodeBuildDefaults`,
735
+ `assetPublishingCodeBuildDefaults`, or `selfMutationCodeBuildDefaults`:
736
+
737
+ ```ts
738
+ declare const vpc: ec2.Vpc;
739
+ declare const mySecurityGroup: ec2.SecurityGroup;
740
+ new pipelines.CodePipeline(this, 'Pipeline', {
741
+ // Standard CodePipeline properties
742
+ synth: new pipelines.ShellStep('Synth', {
743
+ input: pipelines.CodePipelineSource.connection('my-org/my-app', 'main', {
744
+ connectionArn: 'arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41', // Created using the AWS console * });',
745
+ }),
746
+ commands: [
747
+ 'npm ci',
748
+ 'npm run build',
749
+ 'npx cdk synth',
750
+ ],
751
+ }),
752
+
753
+ // Defaults for all CodeBuild projects
754
+ codeBuildDefaults: {
755
+ // Prepend commands and configuration to all projects
756
+ partialBuildSpec: codebuild.BuildSpec.fromObject({
757
+ version: '0.2',
758
+ // ...
759
+ }),
760
+
761
+ // Control the build environment
762
+ buildEnvironment: {
763
+ computeType: codebuild.ComputeType.LARGE,
764
+ },
765
+
766
+ // Control Elastic Network Interface creation
767
+ vpc: vpc,
768
+ subnetSelection: { subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS },
769
+ securityGroups: [mySecurityGroup],
770
+
771
+ // Additional policy statements for the execution role
772
+ rolePolicy: [
773
+ new iam.PolicyStatement({ /* ... */ }),
774
+ ],
775
+ },
776
+
777
+ synthCodeBuildDefaults: { /* ... */ },
778
+ assetPublishingCodeBuildDefaults: { /* ... */ },
779
+ selfMutationCodeBuildDefaults: { /* ... */ },
780
+ });
781
+ ```
782
+
783
+ ### Arbitrary CodePipeline actions
784
+
785
+ If you want to add a type of CodePipeline action to the CDK Pipeline that
786
+ doesn't have a matching class yet, you can define your own step class that extends
787
+ `Step` and implements `ICodePipelineActionFactory`.
788
+
789
+ Here's an example that adds a Jenkins step:
790
+
791
+ ```ts
792
+ class MyJenkinsStep extends pipelines.Step implements pipelines.ICodePipelineActionFactory {
793
+ constructor(
794
+ private readonly provider: cpactions.JenkinsProvider,
795
+ private readonly input: pipelines.FileSet,
796
+ ) {
797
+ super('MyJenkinsStep');
798
+
799
+ // This is necessary if your step accepts parametres, like environment variables,
800
+ // that may contain outputs from other steps. It doesn't matter what the
801
+ // structure is, as long as it contains the values that may contain outputs.
802
+ this.discoverReferencedOutputs({
803
+ env: { /* ... */ }
804
+ });
805
+ }
806
+
807
+ public produceAction(stage: codepipeline.IStage, options: pipelines.ProduceActionOptions): pipelines.CodePipelineActionFactoryResult {
808
+
809
+ // This is where you control what type of Action gets added to the
810
+ // CodePipeline
811
+ stage.addAction(new cpactions.JenkinsAction({
812
+ // Copy 'actionName' and 'runOrder' from the options
813
+ actionName: options.actionName,
814
+ runOrder: options.runOrder,
815
+
816
+ // Jenkins-specific configuration
817
+ type: cpactions.JenkinsActionType.TEST,
818
+ jenkinsProvider: this.provider,
819
+ projectName: 'MyJenkinsProject',
820
+
821
+ // Translate the FileSet into a codepipeline.Artifact
822
+ inputs: [options.artifacts.toCodePipeline(this.input)],
823
+ }));
824
+
825
+ return { runOrdersConsumed: 1 };
826
+ }
827
+ }
828
+ ```
829
+
830
+ ### Using an existing AWS Codepipeline
831
+
832
+ If you wish to use an existing `CodePipeline.Pipeline` while using the modern API's
833
+ methods and classes, you can pass in the existing `CodePipeline.Pipeline` to be built upon
834
+ instead of having the `pipelines.CodePipeline` construct create a new `CodePipeline.Pipeline`.
835
+ This also gives you more direct control over the underlying `CodePipeline.Pipeline` construct
836
+ if the way the modern API creates it doesn't allow for desired configurations.
837
+
838
+ Here's an example of passing in an existing pipeline:
839
+
840
+ ```ts
841
+ declare const codePipeline: codepipeline.Pipeline;
842
+
843
+ const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
844
+ synth: new pipelines.ShellStep('Synth', {
845
+ input: pipelines.CodePipelineSource.connection('my-org/my-app', 'main', {
846
+ connectionArn: 'arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41', // Created using the AWS console * });',
847
+ }),
848
+ commands: ['npm ci','npm run build','npx cdk synth'],
849
+ }),
850
+ codePipeline: codePipeline,
851
+ });
852
+ ```
853
+
854
+ Note that if you provide an existing pipeline, you cannot provide values for
855
+ `pipelineName`, `crossAccountKeys`, `reuseCrossRegionSupportStacks`, or `role`
856
+ because those values are passed in directly to the underlying `codepipeline.Pipeline`.
857
+
858
+ ## Using Docker in the pipeline
859
+
860
+ Docker can be used in 3 different places in the pipeline:
861
+
862
+ * If you are using Docker image assets in your application stages: Docker will
863
+ run in the asset publishing projects.
864
+ * If you are using Docker image assets in your stack (for example as
865
+ images for your CodeBuild projects): Docker will run in the self-mutate project.
866
+ * If you are using Docker to bundle file assets anywhere in your project (for
867
+ example, if you are using such construct libraries as
868
+ `@aws-cdk/aws-lambda-nodejs`): Docker will run in the
869
+ *synth* project.
870
+
871
+ For the first case, you don't need to do anything special. For the other two cases,
872
+ you need to make sure that **privileged mode** is enabled on the correct CodeBuild
873
+ projects, so that Docker can run correctly. The follow sections describe how to do
874
+ that.
875
+
876
+ You may also need to authenticate to Docker registries to avoid being throttled.
877
+ See the section **Authenticating to Docker registries** below for information on how to do
878
+ that.
879
+
880
+ ### Using Docker image assets in the pipeline
881
+
882
+ If your `PipelineStack` is using Docker image assets (as opposed to the application
883
+ stacks the pipeline is deploying), for example by the use of `LinuxBuildImage.fromAsset()`,
884
+ you need to pass `dockerEnabledForSelfMutation: true` to the pipeline. For example:
885
+
886
+ ```ts
887
+ const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
888
+ synth: new pipelines.ShellStep('Synth', {
889
+ input: pipelines.CodePipelineSource.connection('my-org/my-app', 'main', {
890
+ connectionArn: 'arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41', // Created using the AWS console * });',
891
+ }),
892
+ commands: ['npm ci','npm run build','npx cdk synth'],
893
+ }),
894
+
895
+ // Turn this on because the pipeline uses Docker image assets
896
+ dockerEnabledForSelfMutation: true,
897
+ });
898
+
899
+ pipeline.addWave('MyWave', {
900
+ post: [
901
+ new pipelines.CodeBuildStep('RunApproval', {
902
+ commands: ['command-from-image'],
903
+ buildEnvironment: {
904
+ // The user of a Docker image asset in the pipeline requires turning on
905
+ // 'dockerEnabledForSelfMutation'.
906
+ buildImage: codebuild.LinuxBuildImage.fromAsset(this, 'Image', {
907
+ directory: './docker-image',
908
+ }),
909
+ },
910
+ }),
911
+ ],
912
+ });
913
+ ```
914
+
915
+ > **Important**: You must turn on the `dockerEnabledForSelfMutation` flag,
916
+ > commit and allow the pipeline to self-update *before* adding the actual
917
+ > Docker asset.
918
+
919
+ ### Using bundled file assets
920
+
921
+ If you are using asset bundling anywhere (such as automatically done for you
922
+ if you add a construct like `@aws-cdk/aws-lambda-nodejs`), you need to pass
923
+ `dockerEnabledForSynth: true` to the pipeline. For example:
924
+
925
+ ```ts
926
+ const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
927
+ synth: new pipelines.ShellStep('Synth', {
928
+ input: pipelines.CodePipelineSource.connection('my-org/my-app', 'main', {
929
+ connectionArn: 'arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41', // Created using the AWS console * });',
930
+ }),
931
+ commands: ['npm ci','npm run build','npx cdk synth'],
932
+ }),
933
+
934
+ // Turn this on because the application uses bundled file assets
935
+ dockerEnabledForSynth: true,
936
+ });
937
+ ```
938
+
939
+ > **Important**: You must turn on the `dockerEnabledForSynth` flag,
940
+ > commit and allow the pipeline to self-update *before* adding the actual
941
+ > Docker asset.
942
+
943
+ ### Authenticating to Docker registries
944
+
945
+ You can specify credentials to use for authenticating to Docker registries as part of the
946
+ pipeline definition. This can be useful if any Docker image assets — in the pipeline or
947
+ any of the application stages — require authentication, either due to being in a
948
+ different environment (e.g., ECR repo) or to avoid throttling (e.g., DockerHub).
949
+
950
+ ```ts
951
+ const dockerHubSecret = secretsmanager.Secret.fromSecretCompleteArn(this, 'DHSecret', 'arn:aws:...');
952
+ const customRegSecret = secretsmanager.Secret.fromSecretCompleteArn(this, 'CRSecret', 'arn:aws:...');
953
+ const repo1 = ecr.Repository.fromRepositoryArn(this, 'Repo', 'arn:aws:ecr:eu-west-1:0123456789012:repository/Repo1');
954
+ const repo2 = ecr.Repository.fromRepositoryArn(this, 'Repo', 'arn:aws:ecr:eu-west-1:0123456789012:repository/Repo2');
955
+
956
+ const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
957
+ dockerCredentials: [
958
+ pipelines.DockerCredential.dockerHub(dockerHubSecret),
959
+ pipelines.DockerCredential.customRegistry('dockerregistry.example.com', customRegSecret),
960
+ pipelines.DockerCredential.ecr([repo1, repo2]),
961
+ ],
962
+ synth: new pipelines.ShellStep('Synth', {
963
+ input: pipelines.CodePipelineSource.connection('my-org/my-app', 'main', {
964
+ connectionArn: 'arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41', // Created using the AWS console * });',
965
+ }),
966
+ commands: ['npm ci','npm run build','npx cdk synth'],
967
+ }),
968
+ });
969
+ ```
970
+
971
+ For authenticating to Docker registries that require a username and password combination
972
+ (like DockerHub), create a Secrets Manager Secret with fields named `username`
973
+ and `secret`, and import it (the field names change be customized).
974
+
975
+ Authentication to ECR repostories is done using the execution role of the
976
+ relevant CodeBuild job. Both types of credentials can be provided with an
977
+ optional role to assume before requesting the credentials.
978
+
979
+ By default, the Docker credentials provided to the pipeline will be available to
980
+ the **Synth**, **Self-Update**, and **Asset Publishing** actions within the
981
+ *pipeline. The scope of the credentials can be limited via the `DockerCredentialUsage` option.
982
+
983
+ ```ts
984
+ const dockerHubSecret = secretsmanager.Secret.fromSecretCompleteArn(this, 'DHSecret', 'arn:aws:...');
985
+ // Only the image asset publishing actions will be granted read access to the secret.
986
+ const creds = pipelines.DockerCredential.dockerHub(dockerHubSecret, { usages: [pipelines.DockerCredentialUsage.ASSET_PUBLISHING] });
987
+ ```
988
+
989
+ ## CDK Environment Bootstrapping
990
+
991
+ An *environment* is an *(account, region)* pair where you want to deploy a
992
+ CDK stack (see
993
+ [Environments](https://docs.aws.amazon.com/cdk/latest/guide/environments.html)
994
+ in the CDK Developer Guide). In a Continuous Deployment pipeline, there are
995
+ at least two environments involved: the environment where the pipeline is
996
+ provisioned, and the environment where you want to deploy the application (or
997
+ different stages of the application). These can be the same, though best
998
+ practices recommend you isolate your different application stages from each
999
+ other in different AWS accounts or regions.
1000
+
1001
+ Before you can provision the pipeline, you have to *bootstrap* the environment you want
1002
+ to create it in. If you are deploying your application to different environments, you
1003
+ also have to bootstrap those and be sure to add a *trust* relationship.
1004
+
1005
+ After you have bootstrapped an environment and created a pipeline that deploys
1006
+ to it, it's important that you don't delete the stack or change its *Qualifier*,
1007
+ or future deployments to this environment will fail. If you want to upgrade
1008
+ the bootstrap stack to a newer version, do that by updating it in-place.
1009
+
1010
+ > This library requires the *modern* bootstrapping stack which has
1011
+ > been updated specifically to support cross-account continuous delivery.
1012
+ >
1013
+ > If you are using CDKv2, you do not need to do anything else. Modern
1014
+ > bootstrapping and modern stack synthesis (also known as "default stack
1015
+ > synthesis") is the default.
1016
+ >
1017
+ > If you are using CDKv1, you need to opt in to modern bootstrapping and
1018
+ > modern stack synthesis using a feature flag. Make sure `cdk.json` includes:
1019
+ >
1020
+ > ```json
1021
+ > {
1022
+ > "context": {
1023
+ > "@aws-cdk/core:newStyleStackSynthesis": true
1024
+ > }
1025
+ > }
1026
+ > ```
1027
+ >
1028
+ > And be sure to run `cdk bootstrap` in the same directory as the `cdk.json`
1029
+ > file.
1030
+
1031
+ To bootstrap an environment for provisioning the pipeline:
1032
+
1033
+ ```console
1034
+ $ npx cdk bootstrap \
1035
+ [--profile admin-profile-1] \
1036
+ --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess \
1037
+ aws://111111111111/us-east-1
1038
+ ```
1039
+
1040
+ To bootstrap a different environment for deploying CDK applications into using
1041
+ a pipeline in account `111111111111`:
1042
+
1043
+ ```console
1044
+ $ npx cdk bootstrap \
1045
+ [--profile admin-profile-2] \
1046
+ --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess \
1047
+ --trust 11111111111 \
1048
+ aws://222222222222/us-east-2
1049
+ ```
1050
+
1051
+ If you only want to trust an account to do lookups (e.g, when your CDK application has a
1052
+ `Vpc.fromLookup()` call), use the option `--trust-for-lookup`:
1053
+
1054
+ ```console
1055
+ $ npx cdk bootstrap \
1056
+ [--profile admin-profile-2] \
1057
+ --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess \
1058
+ --trust-for-lookup 11111111111 \
1059
+ aws://222222222222/us-east-2
1060
+ ```
1061
+
1062
+ These command lines explained:
1063
+
1064
+ * `npx`: means to use the CDK CLI from the current NPM install. If you are using
1065
+ a global install of the CDK CLI, leave this out.
1066
+ * `--profile`: should indicate a profile with administrator privileges that has
1067
+ permissions to provision a pipeline in the indicated account. You can leave this
1068
+ flag out if either the AWS default credentials or the `AWS_*` environment
1069
+ variables confer these permissions.
1070
+ * `--cloudformation-execution-policies`: ARN of the managed policy that future CDK
1071
+ deployments should execute with. By default this is `AdministratorAccess`, but
1072
+ if you also specify the `--trust` flag to give another Account permissions to
1073
+ deploy into the current account, you must specify a value here.
1074
+ * `--trust`: indicates which other account(s) should have permissions to deploy
1075
+ CDK applications into this account. In this case we indicate the Pipeline's account,
1076
+ but you could also use this for developer accounts (don't do that for production
1077
+ application accounts though!).
1078
+ * `--trust-for-lookup`: gives a more limited set of permissions to the
1079
+ trusted account, only allowing it to look up values such as availability zones, EC2 images and
1080
+ VPCs. `--trust-for-lookup` does not give permissions to modify anything in the account.
1081
+ Note that `--trust` implies `--trust-for-lookup`, so you don't need to specify
1082
+ the same acocunt twice.
1083
+ * `aws://222222222222/us-east-2`: the account and region we're bootstrapping.
1084
+
1085
+ > Be aware that anyone who has access to the trusted Accounts **effectively has all
1086
+ > permissions conferred by the configured CloudFormation execution policies**,
1087
+ > allowing them to do things like read arbitrary S3 buckets and create arbitrary
1088
+ > infrastructure in the bootstrapped account. Restrict the list of `--trust`ed Accounts,
1089
+ > or restrict the policies configured by `--cloudformation-execution-policies`.
1090
+
1091
+ <br>
1092
+
1093
+ > **Security tip**: we recommend that you use administrative credentials to an
1094
+ > account only to bootstrap it and provision the initial pipeline. Otherwise,
1095
+ > access to administrative credentials should be dropped as soon as possible.
1096
+
1097
+ <br>
1098
+
1099
+ > **On the use of AdministratorAccess**: The use of the `AdministratorAccess` policy
1100
+ > ensures that your pipeline can deploy every type of AWS resource to your account.
1101
+ > Make sure you trust all the code and dependencies that make up your CDK app.
1102
+ > Check with the appropriate department within your organization to decide on the
1103
+ > proper policy to use.
1104
+ >
1105
+ > If your policy includes permissions to create on attach permission to a role,
1106
+ > developers can escalate their privilege with more permissive permission.
1107
+ > Thus, we recommend implementing [permissions boundary](https://aws.amazon.com/premiumsupport/knowledge-center/iam-permission-boundaries/)
1108
+ > in the CDK Execution role. To do this, you can bootstrap with the `--template` option with
1109
+ > [a customized template](https://github.com/aws-samples/aws-bootstrap-kit-examples/blob/ba28a97d289128281bc9483bcba12c1793f2c27a/source/1-SDLC-organization/lib/cdk-bootstrap-template.yml#L395) that contains a permission boundary.
1110
+
1111
+ ### Migrating from old bootstrap stack
1112
+
1113
+ The bootstrap stack is a CloudFormation stack in your account named
1114
+ **CDKToolkit** that provisions a set of resources required for the CDK
1115
+ to deploy into that environment.
1116
+
1117
+ The "new" bootstrap stack (obtained by running `cdk bootstrap` with
1118
+ `CDK_NEW_BOOTSTRAP=1`) is slightly more elaborate than the "old" stack. It
1119
+ contains:
1120
+
1121
+ * An S3 bucket and ECR repository with predictable names, so that we can reference
1122
+ assets in these storage locations *without* the use of CloudFormation template
1123
+ parameters.
1124
+ * A set of roles with permissions to access these asset locations and to execute
1125
+ CloudFormation, assumable from whatever accounts you specify under `--trust`.
1126
+
1127
+ It is possible and safe to migrate from the old bootstrap stack to the new
1128
+ bootstrap stack. This will create a new S3 file asset bucket in your account
1129
+ and orphan the old bucket. You should manually delete the orphaned bucket
1130
+ after you are sure you have redeployed all CDK applications and there are no
1131
+ more references to the old asset bucket.
1132
+
1133
+ ## Context Lookups
1134
+
1135
+ You might be using CDK constructs that need to look up [runtime
1136
+ context](https://docs.aws.amazon.com/cdk/latest/guide/context.html#context_methods),
1137
+ which is information from the target AWS Account and Region the CDK needs to
1138
+ synthesize CloudFormation templates appropriate for that environment. Examples
1139
+ of this kind of context lookups are the number of Availability Zones available
1140
+ to you, a Route53 Hosted Zone ID, or the ID of an AMI in a given region. This
1141
+ information is automatically looked up when you run `cdk synth`.
1142
+
1143
+ By default, a `cdk synth` performed in a pipeline will not have permissions
1144
+ to perform these lookups, and the lookups will fail. This is by design.
1145
+
1146
+ **Our recommended way of using lookups** is by running `cdk synth` on the
1147
+ developer workstation and checking in the `cdk.context.json` file, which
1148
+ contains the results of the context lookups. This will make sure your
1149
+ synthesized infrastructure is consistent and repeatable. If you do not commit
1150
+ `cdk.context.json`, the results of the lookups may suddenly be different in
1151
+ unexpected ways, and even produce results that cannot be deployed or will cause
1152
+ data loss. To give an account permissions to perform lookups against an
1153
+ environment, without being able to deploy to it and make changes, run
1154
+ `cdk bootstrap --trust-for-lookup=<account>`.
1155
+
1156
+ If you want to use lookups directly from the pipeline, you either need to accept
1157
+ the risk of nondeterminism, or make sure you save and load the
1158
+ `cdk.context.json` file somewhere between synth runs. Finally, you should
1159
+ give the synth CodeBuild execution role permissions to assume the bootstrapped
1160
+ lookup roles. As an example, doing so would look like this:
1161
+
1162
+ ```ts
1163
+ new pipelines.CodePipeline(this, 'Pipeline', {
1164
+ synth: new pipelines.CodeBuildStep('Synth', {
1165
+ input: pipelines.CodePipelineSource.connection('my-org/my-app', 'main', {
1166
+ connectionArn: 'arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41', // Created using the AWS console * });',
1167
+ }),
1168
+ commands: [
1169
+ // Commands to load cdk.context.json from somewhere here
1170
+ '...',
1171
+ 'npm ci',
1172
+ 'npm run build',
1173
+ 'npx cdk synth',
1174
+ // Commands to store cdk.context.json back here
1175
+ '...',
1176
+ ],
1177
+ rolePolicyStatements: [
1178
+ new iam.PolicyStatement({
1179
+ actions: ['sts:AssumeRole'],
1180
+ resources: ['*'],
1181
+ conditions: {
1182
+ StringEquals: {
1183
+ 'iam:ResourceTag/aws-cdk:bootstrap-role': 'lookup',
1184
+ },
1185
+ },
1186
+ }),
1187
+ ],
1188
+ }),
1189
+ });
1190
+ ```
1191
+
1192
+ The above example requires that the target environments have all
1193
+ been bootstrapped with bootstrap stack version `8`, released with
1194
+ CDK CLI `1.114.0`.
1195
+
1196
+ ## Security Considerations
1197
+
1198
+ It's important to stay safe while employing Continuous Delivery. The CDK Pipelines
1199
+ library comes with secure defaults to the best of our ability, but by its
1200
+ very nature the library cannot take care of everything.
1201
+
1202
+ We therefore expect you to mind the following:
1203
+
1204
+ * Maintain dependency hygiene and vet 3rd-party software you use. Any software you
1205
+ run on your build machine has the ability to change the infrastructure that gets
1206
+ deployed. Be careful with the software you depend on.
1207
+
1208
+ * Use dependency locking to prevent accidental upgrades! The default `CdkSynths` that
1209
+ come with CDK Pipelines will expect `package-lock.json` and `yarn.lock` to
1210
+ ensure your dependencies are the ones you expect.
1211
+
1212
+ * Credentials to production environments should be short-lived. After
1213
+ bootstrapping and the initial pipeline provisioning, there is no more need for
1214
+ developers to have access to any of the account credentials; all further
1215
+ changes can be deployed through git. Avoid the chances of credentials leaking
1216
+ by not having them in the first place!
1217
+
1218
+ ### Confirm permissions broadening
1219
+
1220
+ To keep tabs on the security impact of changes going out through your pipeline,
1221
+ you can insert a security check before any stage deployment. This security check
1222
+ will check if the upcoming deployment would add any new IAM permissions or
1223
+ security group rules, and if so pause the pipeline and require you to confirm
1224
+ the changes.
1225
+
1226
+ The security check will appear as two distinct actions in your pipeline: first
1227
+ a CodeBuild project that runs `cdk diff` on the stage that's about to be deployed,
1228
+ followed by a Manual Approval action that pauses the pipeline. If it so happens
1229
+ that there no new IAM permissions or security group rules will be added by the deployment,
1230
+ the manual approval step is automatically satisfied. The pipeline will look like this:
1231
+
1232
+ ```txt
1233
+ Pipeline
1234
+ ├── ...
1235
+ ├── MyApplicationStage
1236
+ │   ├── MyApplicationSecurityCheck // Security Diff Action
1237
+ │   ├── MyApplicationManualApproval // Manual Approval Action
1238
+ │   ├── Stack.Prepare
1239
+ │   └── Stack.Deploy
1240
+ └── ...
1241
+ ```
1242
+
1243
+ You can insert the security check by using a `ConfirmPermissionsBroadening` step:
1244
+
1245
+ ```ts
1246
+ declare const pipeline: pipelines.CodePipeline;
1247
+ const stage = new MyApplicationStage(this, 'MyApplication');
1248
+ pipeline.addStage(stage, {
1249
+ pre: [
1250
+ new pipelines.ConfirmPermissionsBroadening('Check', { stage }),
1251
+ ],
1252
+ });
1253
+ ```
1254
+
1255
+ To get notified when there is a change that needs your manual approval,
1256
+ create an SNS Topic, subscribe your own email address, and pass it in as
1257
+ as the `notificationTopic` property:
1258
+
1259
+ ```ts
1260
+ declare const pipeline: pipelines.CodePipeline;
1261
+ const topic = new sns.Topic(this, 'SecurityChangesTopic');
1262
+ topic.addSubscription(new subscriptions.EmailSubscription('test@email.com'));
1263
+
1264
+ const stage = new MyApplicationStage(this, 'MyApplication');
1265
+ pipeline.addStage(stage, {
1266
+ pre: [
1267
+ new pipelines.ConfirmPermissionsBroadening('Check', {
1268
+ stage,
1269
+ notificationTopic: topic,
1270
+ }),
1271
+ ],
1272
+ });
1273
+ ```
1274
+
1275
+ **Note**: Manual Approvals notifications only apply when an application has security
1276
+ check enabled.
1277
+
1278
+ ## Using a different deployment engine
1279
+
1280
+ CDK Pipelines supports multiple *deployment engines*, but this module vends a
1281
+ construct for only one such engine: AWS CodePipeline. It is also possible to
1282
+ use CDK Pipelines to build pipelines backed by other deployment engines.
1283
+
1284
+ Here is a list of CDK Libraries that integrate CDK Pipelines with
1285
+ alternative deployment engines:
1286
+
1287
+ * GitHub Workflows: [`cdk-pipelines-github`](https://github.com/cdklabs/cdk-pipelines-github)
1288
+
1289
+ ## Troubleshooting
1290
+
1291
+ Here are some common errors you may encounter while using this library.
1292
+
1293
+ ### Pipeline: Internal Failure
1294
+
1295
+ If you see the following error during deployment of your pipeline:
1296
+
1297
+ ```plaintext
1298
+ CREATE_FAILED | AWS::CodePipeline::Pipeline | Pipeline/Pipeline
1299
+ Internal Failure
1300
+ ```
1301
+
1302
+ There's something wrong with your GitHub access token. It might be missing, or not have the
1303
+ right permissions to access the repository you're trying to access.
1304
+
1305
+ ### Key: Policy contains a statement with one or more invalid principals
1306
+
1307
+ If you see the following error during deployment of your pipeline:
1308
+
1309
+ ```plaintext
1310
+ CREATE_FAILED | AWS::KMS::Key | Pipeline/Pipeline/ArtifactsBucketEncryptionKey
1311
+ Policy contains a statement with one or more invalid principals.
1312
+ ```
1313
+
1314
+ One of the target (account, region) environments has not been bootstrapped
1315
+ with the new bootstrap stack. Check your target environments and make sure
1316
+ they are all bootstrapped.
1317
+
1318
+ ### Message: no matching base directory path found for cdk.out
1319
+
1320
+ If you see this error during the **Synth** step, it means that CodeBuild
1321
+ is expecting to find a `cdk.out` directory in the root of your CodeBuild project,
1322
+ but the directory wasn't there. There are two common causes for this:
1323
+
1324
+ * `cdk synth` is not being executed: `cdk synth` used to be run
1325
+ implicitly for you, but you now have to explicitly include the command.
1326
+ For NPM-based projects, add `npx cdk synth` to the end of the `commands`
1327
+ property, for other languages add `npm install -g aws-cdk` and `cdk synth`.
1328
+ * Your CDK project lives in a subdirectory: you added a `cd <somedirectory>` command
1329
+ to the list of commands; don't forget to tell the `ScriptStep` about the
1330
+ different location of `cdk.out`, by passing `primaryOutputDirectory: '<somedirectory>/cdk.out'`.
1331
+
1332
+ ### <Stack> is in ROLLBACK_COMPLETE state and can not be updated
1333
+
1334
+ If you see the following error during execution of your pipeline:
1335
+
1336
+ ```plaintext
1337
+ Stack ... is in ROLLBACK_COMPLETE state and can not be updated. (Service:
1338
+ AmazonCloudFormation; Status Code: 400; Error Code: ValidationError; Request
1339
+ ID: ...)
1340
+ ```
1341
+
1342
+ The stack failed its previous deployment, and is in a non-retryable state.
1343
+ Go into the CloudFormation console, delete the stack, and retry the deployment.
1344
+
1345
+ ### Cannot find module 'xxxx' or its corresponding type declarations
1346
+
1347
+ You may see this if you are using TypeScript or other NPM-based languages,
1348
+ when using NPM 7 on your workstation (where you generate `package-lock.json`)
1349
+ and NPM 6 on the CodeBuild image used for synthesizing.
1350
+
1351
+ It looks like NPM 7 has started writing less information to `package-lock.json`,
1352
+ leading NPM 6 reading that same file to not install all required packages anymore.
1353
+
1354
+ Make sure you are using the same NPM version everywhere, either downgrade your
1355
+ workstation's version or upgrade the CodeBuild version.
1356
+
1357
+ ### Cannot find module '.../check-node-version.js' (MODULE_NOT_FOUND)
1358
+
1359
+ The above error may be produced by `npx` when executing the CDK CLI, or any
1360
+ project that uses the AWS SDK for JavaScript, without the target application
1361
+ having been installed yet. For example, it can be triggered by `npx cdk synth`
1362
+ if `aws-cdk` is not in your `package.json`.
1363
+
1364
+ Work around this by either installing the target application using NPM *before*
1365
+ running `npx`, or set the environment variable `NPM_CONFIG_UNSAFE_PERM=true`.
1366
+
1367
+ ### Cannot connect to the Docker daemon at unix:///var/run/docker.sock
1368
+
1369
+ If, in the 'Synth' action (inside the 'Build' stage) of your pipeline, you get an error like this:
1370
+
1371
+ ```console
1372
+ stderr: docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
1373
+ See 'docker run --help'.
1374
+ ```
1375
+
1376
+ It means that the AWS CodeBuild project for 'Synth' is not configured to run in privileged mode,
1377
+ which prevents Docker builds from happening. This typically happens if you use a CDK construct
1378
+ that bundles asset using tools run via Docker, like `aws-lambda-nodejs`, `aws-lambda-python`,
1379
+ `aws-lambda-go` and others.
1380
+
1381
+ Make sure you set the `privileged` environment variable to `true` in the synth definition:
1382
+
1383
+ ```ts
1384
+ const sourceArtifact = new codepipeline.Artifact();
1385
+ const cloudAssemblyArtifact = new codepipeline.Artifact();
1386
+ const pipeline = new pipelines.CdkPipeline(this, 'MyPipeline', {
1387
+ cloudAssemblyArtifact,
1388
+ synthAction: pipelines.SimpleSynthAction.standardNpmSynth({
1389
+ sourceArtifact,
1390
+ cloudAssemblyArtifact,
1391
+ environment: {
1392
+ privileged: true,
1393
+ },
1394
+ }),
1395
+ });
1396
+ ```
1397
+
1398
+ After turning on `privilegedMode: true`, you will need to do a one-time manual cdk deploy of your
1399
+ pipeline to get it going again (as with a broken 'synth' the pipeline will not be able to self
1400
+ update to the right state).
1401
+
1402
+ ### Not authorized to perform sts:AssumeRole on arn:aws:iam::\*:role/\*-lookup-role-\*
1403
+
1404
+ You may get an error like the following in the **Synth** step:
1405
+
1406
+ ```text
1407
+ Could not assume role in target account using current credentials (which are for account 111111111111). User:
1408
+ arn:aws:sts::111111111111:assumed-role/PipelineStack-PipelineBuildSynthCdkBuildProje-..../AWSCodeBuild-....
1409
+ is not authorized to perform: sts:AssumeRole on resource:
1410
+ arn:aws:iam::222222222222:role/cdk-hnb659fds-lookup-role-222222222222-us-east-1.
1411
+ Please make sure that this role exists in the account. If it doesn't exist, (re)-bootstrap the environment with
1412
+ the right '--trust', using the latest version of the CDK CLI.
1413
+ ```
1414
+
1415
+ This is a sign that the CLI is trying to do Context Lookups during the **Synth** step, which are failing
1416
+ because it cannot assume the right role. We recommend you don't rely on Context Lookups in the pipeline at
1417
+ all, and commit a file called `cdk.context.json` with the right lookup values in it to source control.
1418
+
1419
+ If you do want to do lookups in the pipeline, the cause is one of the following:
1420
+
1421
+ * The target environment has not been bootstrapped; OR
1422
+ * The target environment has been bootstrapped without the right `--trust` relationship; OR
1423
+ * The CodeBuild execution role does not have permissions to call `sts:AssumeRole`.
1424
+
1425
+ See the section called **Context Lookups** for more information on using this feature.
1426
+
1427
+ ### IAM policies: Cannot exceed quota for PoliciesPerRole / Maximum policy size exceeded
1428
+
1429
+ This happens as a result of having a lot of targets in the Pipeline: the IAM policies that
1430
+ get generated enumerate all required roles and grow too large.
1431
+
1432
+ Make sure you are on version `2.26.0` or higher, and that your `cdk.json` contains the
1433
+ following:
1434
+
1435
+ ```json
1436
+ {
1437
+ "context": {
1438
+ "@aws-cdk/aws-iam:minimizePolicies": true
1439
+ }
1440
+ }
1441
+ ```
1442
+
1443
+ ### S3 error: Access Denied
1444
+
1445
+ An "S3 Access Denied" error can have two causes:
1446
+
1447
+ * Asset hashes have changed, but self-mutation has been disabled in the pipeline.
1448
+ * You have deleted and recreated the bootstrap stack, or changed its qualifier.
1449
+
1450
+ #### Self-mutation step has been removed
1451
+
1452
+ Some constructs, such as EKS clusters, generate nested stacks. When CloudFormation tries
1453
+ to deploy those stacks, it may fail with this error:
1454
+
1455
+ ```console
1456
+ S3 error: Access Denied For more information check http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
1457
+ ```
1458
+
1459
+ This happens because the pipeline is not self-mutating and, as a consequence, the `FileAssetX`
1460
+ build projects get out-of-sync with the generated templates. To fix this, make sure the
1461
+ `selfMutating` property is set to `true`:
1462
+
1463
+ ```ts
1464
+ const cloudAssemblyArtifact = new codepipeline.Artifact();
1465
+ const pipeline = new pipelines.CdkPipeline(this, 'MyPipeline', {
1466
+ selfMutating: true,
1467
+ cloudAssemblyArtifact,
1468
+ });
1469
+ ```
1470
+
1471
+ #### Bootstrap roles have been renamed or recreated
1472
+
1473
+ While attempting to deploy an application stage, the "Prepare" or "Deploy" stage may fail with a cryptic error like:
1474
+
1475
+ `Action execution failed
1476
+ Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 0123456ABCDEFGH;
1477
+ S3 Extended Request ID: 3hWcrVkhFGxfiMb/rTJO0Bk7Qn95x5ll4gyHiFsX6Pmk/NT+uX9+Z1moEcfkL7H3cjH7sWZfeD0=; Proxy: null)`
1478
+
1479
+ This generally indicates that the roles necessary to deploy have been deleted (or deleted and re-created);
1480
+ for example, if the bootstrap stack has been deleted and re-created, this scenario will happen. Under the hood,
1481
+ the resources that rely on these roles (e.g., `cdk-$qualifier-deploy-role-$account-$region`) point to different
1482
+ canonical IDs than the recreated versions of these roles, which causes the errors. There are no simple solutions
1483
+ to this issue, and for that reason we **strongly recommend** that bootstrap stacks not be deleted and re-created
1484
+ once created.
1485
+
1486
+ The most automated way to solve the issue is to introduce a secondary bootstrap stack. By changing the qualifier
1487
+ that the pipeline stack looks for, a change will be detected and the impacted policies and resources will be updated.
1488
+ A hypothetical recovery workflow would look something like this:
1489
+
1490
+ * First, for all impacted environments, create a secondary bootstrap stack:
1491
+
1492
+ ```sh
1493
+ $ env CDK_NEW_BOOTSTRAP=1 npx cdk bootstrap \
1494
+ --qualifier random1234 \
1495
+ --toolkit-stack-name CDKToolkitTemp \
1496
+ aws://111111111111/us-east-1
1497
+ ```
1498
+
1499
+ * Update all impacted stacks in the pipeline to use this new qualifier.
1500
+ See https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html for more info.
1501
+
1502
+ ```ts
1503
+ new Stack(this, 'MyStack', {
1504
+ // Update this qualifier to match the one used above.
1505
+ synthesizer: new cdk.DefaultStackSynthesizer({
1506
+ qualifier: 'randchars1234',
1507
+ }),
1508
+ });
1509
+ ```
1510
+
1511
+ * Deploy the updated stacks. This will update the stacks to use the roles created in the new bootstrap stack.
1512
+ * (Optional) Restore back to the original state:
1513
+ * Revert the change made in step #2 above
1514
+ * Re-deploy the pipeline to use the original qualifier.
1515
+ * Delete the temporary bootstrap stack(s)
1516
+
1517
+ ##### Manual Alternative
1518
+
1519
+ Alternatively, the errors can be resolved by finding each impacted resource and policy, and correcting the policies
1520
+ by replacing the canonical IDs (e.g., `AROAYBRETNYCYV6ZF2R93`) with the appropriate ARNs. As an example, the KMS
1521
+ encryption key policy for the artifacts bucket may have a statement that looks like the following:
1522
+
1523
+ ```json
1524
+ {
1525
+ "Effect" : "Allow",
1526
+ "Principal" : {
1527
+ // "AWS" : "AROAYBRETNYCYV6ZF2R93" // Indicates this issue; replace this value
1528
+ "AWS": "arn:aws:iam::0123456789012:role/cdk-hnb659fds-deploy-role-0123456789012-eu-west-1", // Correct value
1529
+ },
1530
+ "Action" : [ "kms:Decrypt", "kms:DescribeKey" ],
1531
+ "Resource" : "*"
1532
+ }
1533
+ ```
1534
+
1535
+ Any resource or policy that references the qualifier (`hnb659fds` by default) will need to be updated.
1536
+
1537
+ ### This CDK CLI is not compatible with the CDK library used by your application
1538
+
1539
+ The CDK CLI version used in your pipeline is too old to read the Cloud Assembly
1540
+ produced by your CDK app.
1541
+
1542
+ Most likely this happens in the `SelfMutate` action, you are passing the `cliVersion`
1543
+ parameter to control the version of the CDK CLI, and you just updated the CDK
1544
+ framework version that your application uses. You either forgot to change the
1545
+ `cliVersion` parameter, or changed the `cliVersion` in the same commit in which
1546
+ you changed the framework version. Because a change to the pipeline settings needs
1547
+ a successful run of the `SelfMutate` step to be applied, the next iteration of the
1548
+ `SelfMutate` step still executes with the *old* CLI version, and that old CLI version
1549
+ is not able to read the cloud assembly produced by the new framework version.
1550
+
1551
+ Solution: change the `cliVersion` first, commit, push and deploy, and only then
1552
+ change the framework version.
1553
+
1554
+ We recommend you avoid specifying the `cliVersion` parameter at all. By default
1555
+ the pipeline will use the latest CLI version, which will support all cloud assembly
1556
+ versions.
1557
+
1558
+ ## Known Issues
1559
+
1560
+ There are some usability issues that are caused by underlying technology, and
1561
+ cannot be remedied by CDK at this point. They are reproduced here for completeness.
1562
+
1563
+ * **Console links to other accounts will not work**: the AWS CodePipeline
1564
+ console will assume all links are relative to the current account. You will
1565
+ not be able to use the pipeline console to click through to a CloudFormation
1566
+ stack in a different account.
1567
+ * **If a change set failed to apply the pipeline must restarted**: if a change
1568
+ set failed to apply, it cannot be retried. The pipeline must be restarted from
1569
+ the top by clicking **Release Change**.
1570
+ * **A stack that failed to create must be deleted manually**: if a stack
1571
+ failed to create on the first attempt, you must delete it using the
1572
+ CloudFormation console before starting the pipeline again by clicking
1573
+ **Release Change**.