设置 Amazon CLI - Amazon Polly
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

设置 Amazon CLI

请按照以下步骤下载并配置 Amazon CLI 以与 Amazon Polly 配合使用。

要设置 Amazon Command Line Interface
  1. 下载并配置 Amazon CLI。有关说明,请参阅《Amazon Command Line Interface 用户指南》中的以下主题:

  2. 在 Config 文件中为管理员用户添加已命名的 Amazon CLI Amazon 配置文件。您可以在运行 Amazon CLI 命令时使用此配置文件。有关命名配置文件的更多信息,请参阅 Amazon Command Line Interface 用户指南中的命名配置文件

    [profile adminuser] aws_access_key_id = adminuser access key ID aws_secret_access_key = adminuser secret access key region = aws-region

    有关可用 Amazon 区域和 Amazon Polly 支持的区域的列表,请参阅中的区域和终端节点Amazon Web Services 一般参考

    注意

    如果您使用的是您在配置时指定的 Amazon Polly 支持的区域 Amazon CLI,请从代码示例中省略以下一行。 Amazon CLI

    --region aws-region
  3. 在命令提示符处键入以下帮助命令来验证设置。

    aws help

    Amazon CLI 窗口中应显示有效 Amazon 命令的列表。