Skip to content

v1.0.1 — cdk bootstrap 步骤可见性修复

Choose a tag to compare

@ddpie ddpie released this 08 Jul 10:21
· 12 commits to main since this release
0ed6bab

中文

修复 cdk bootstrap 步骤可观测性差的问题:此前用 npm install --silent + 无输出的 npx cdk bootstrap,在 npm 源慢、网络到不了 AWS、或仅仅在等 CloudFormation 建 CDKToolkit 栈时,屏幕上什么都看不到,看着像卡死。

  • 去掉 npm install--silent,装依赖进度可见
  • bootstrap 加 CDK_DISABLE_NOTICES=1,跳过 cdk 联网公告检查,避免在访问不了 notices endpoint 的网络(国内常见)上干等
  • 开跑前打印「正在 Bootstrap……通常需 1–2 分钟」,区分正常等待与真卡死
  • 失败时给可操作报错,指向网络 / aws sts get-caller-identity / CloudFormation 里的 CDKToolkit

对已 bootstrap 的区域无影响(脚本仍先探测栈状态,已存在则跳过)。

English

Fixes poor visibility in the cdk bootstrap step. It previously ran npm install --silent plus a silent npx cdk bootstrap, so a slow npm registry, no network path to AWS, or simply waiting on CloudFormation to create the CDKToolkit stack all looked like a hang.

  • Drop --silent from npm install so install progress is visible
  • Add CDK_DISABLE_NOTICES=1 to skip cdk's networked notices check, which hangs on restricted networks (common in mainland China)
  • Print a "Bootstrapping… usually 1–2 min" line to distinguish a normal wait from a real hang
  • On failure, emit an actionable error pointing at network / aws sts get-caller-identity / the CDKToolkit stack in CloudFormation

No-op for already-bootstrapped regions (the script still probes the stack first and skips if present).