

 Amazon Forecast 不再提供給新客戶。Amazon Forecast 的現有客戶可以繼續正常使用服務。[進一步了解」](https://aws.amazon.com/blogs/machine-learning/transition-your-amazon-forecast-usage-to-amazon-sagemaker-canvas/)

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 設定 AWS CLI
<a name="aws-forecast-set-up-aws-cli"></a>

 AWS Command Line Interface (AWS CLI) 是用於管理的統一開發人員工具 AWS 服務，包括 Amazon Forecast。建議您安裝並使用它。

1. 若要安裝 AWS CLI，請遵循*AWS Command Line Interface 《 使用者指南*》中的[安裝 AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/installing.html) 中的指示。

1. 若要設定 AWS CLI 並設定設定檔來呼叫它，請遵循*AWS Command Line Interface 《 使用者指南*》中[設定 AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)中的指示。

1. 若要確認 AWS CLI 設定檔已正確設定，請在命令視窗中執行下列命令：

   ```
   aws configure --profile default
   ```

   如果已正確設定您的設定檔，則您應該會看到如下的輸出：

   ```
   AWS Access Key ID [****************52FQ]: 
   AWS Secret Access Key [****************xgyZ]: 
   Default region name [us-west-2]: 
   Default output format [json]:
   ```

1. 若要確認 AWS CLI 已設定為與 Amazon Forecast 搭配使用，請執行下列命令。

   ```
   aws forecast help
   ```

   ```
   aws forecastquery help
   ```

   如果 AWS CLI 設定正確，您會看到 Amazon Forecast 或 Amazon Forecast Query 支援的 AWS CLI 命令清單。

 