概要
- AWS CDK CLIのバージョン
2.1022.0以降は、2025年9月15日から使用状況データを収集する - デフォルトでオプトインなのでオプトアウト設定をしないと収集される
- オプトアウトは環境変数
CDK_DISABLE_CLI_TELEMETRY=trueか cdk.jsonで"cli-telemetry": falseを設定する
簡単に解説
久しぶりにCDKを触る機会があったので作業していたところ、以下のような通知が出た。
NOTICES (What's this? https://github.com/aws/aws-cdk/wiki/CLI-Notices)
34892 CDK CLI will collect telemetry data on command usage starting at version 2.1100.0 (unless opted out)
Overview: We do not collect customer content and we anonymize the
telemetry we do collect. See the attached issue for more
information on what data is collected, why, and how to
opt-out. Telemetry will NOT be collected for any CDK CLI
version prior to version 2.1100.0 - regardless of
opt-in/out. You can also preview the telemetry we will start
collecting by logging it to a local file, by adding
`--unstable=telemetry --telemetry-file=my/local/file` to any
`cdk` command.
Affected versions: cli: ^2.0.0
More information at: https://github.com/aws/aws-cdk/issues/34892
Issueの趣旨としては、CLIの使用状況に関するテレメトリデータの収集を開始するというもの。
ユーザーのコンテンツは収集せず、収集したテレメトリデータは匿名化されるという。
バージョンが 2.1022.0 より低ければ影響は受けない。
元々は2025年8月8日以降開始だったが、コミュニティの反応を見て現状は9月15日に延期したらしい。
このIssueのリアクションが現時点で👎232票とすごい。
収集内容は以下のRFCで管理されている、本日時点では公式なドキュメントにはなっていない。
設定方法は以下のURLにも記載がある。
対応方法
方法1: 環境変数での設定
export CDK_DISABLE_CLI_TELEMETRY=true
方法2: cdk.jsonでの設定
{
"cli-telemetry": false
}
設定確認方法
cdk cli-telemetry --status
まとめ
ここ最近なかなかCDKをいじる機会がなかったので、このような重要な情報に早めに気がつけるような仕組みをAWSには作って欲しいところです。