AWS s3api put-object-tagging 后如何避免 LESS 响应?

How to avoid LESS response after AWS s3api put-object-tagging?

在我使用 AWS CLI 使用 PutObjectTagging 之后:

aws s3api put-object-tagging --bucket foo --key bar/file --tagging '{"TagSet": [{"Key": "type", "Value": "env-file"}]}'

我的 shell 提示具有以下 less 输出:

{
    "VersionId": "XXXX"
}

然而,这需要我退出 less 提示。当我在 bash 脚本下 运行 时,这似乎在命令后挂起我的脚本。

如何在使用 CLI 时避免此 less 提示和 VersionId 输出?

听起来好像正在调用 cli_pager。您可以使用 ~/.aws/config 文件中的配置设置将其关闭。

来自Using AWS CLI pagination options

The following example sets the default to disable the use of a pager:

[default]
cli_pager=