0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

aws cliで--no-verify-sslを付けたくないzscaler利用の民(windows11用)

Posted at

msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msiでcli自体はインストールできる。

AWS CLI SSL証明書エラー対処手順(全プロファイル適用版)

✅ STEP 1:社内ルート証明書を PEM 形式でエクスポート

  1. Win + Rcertmgr.msc と入力して証明書マネージャを開く。
  2. 「信頼されたルート証明機関」→「証明書」を選択。
  3. Zscaler Root CAを右クリック → すべてのタスク > エクスポート
  4. 「秘密キーをエクスポートしない」→「Base-64 encoded X.509 (.CER)」を選択して保存。
  5. 保存した corp-root.cer.pem にリネームする:
    ren C:\certs\corp-root.cer corp-root.pem
    

✅ STEP 2:AWS CLI に CA を登録(全プロファイル共通)

環境変数で一括適用

# PEMファイルのパスを設定
$ca = "C:\certs\corp-root.pem"

# 一時的に有効(このPowerShellセッション中)
$env:AWS_CA_BUNDLE = $ca

# 永続的に有効(ユーザー環境変数に登録)
[Environment]::SetEnvironmentVariable("AWS_CA_BUNDLE", $ca, "User")

これで全ての AWS CLI プロファイルに適用されます。


✅ STEP 3(任意):各プロファイルに ca_bundle を明示的に設定

$ca = "C:\certs\corp-root.pem"

# 既存の全プロファイルに一括設定
aws configure list-profiles | ForEach-Object {
  aws configure set ca_bundle "$ca" --profile $_
}

# defaultプロファイルにも追加(念のため)
aws configure set ca_bundle "$ca" --profile default

確認:

Get-Content "$HOME\.aws\config" | Select-String -Pattern "ca_bundle"

✅ STEP 4:全プロファイル疎通確認

aws configure list-profiles | ForEach-Object {
  Write-Host "== $_ =="
  aws sts get-caller-identity --profile $_ --output text
}

すべてのプロファイルで正常に動作すれば設定完了です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?