首页 > 解决方案 > AWS CLI --debug ouputs to stderror instead of stdout

问题描述

We have added the --debug flag to all our AWS CLI commands so that we get more information on what is happening during deployments on our CI/CD servers.

The problem is that all debug output is written to stderr instead of stdout, which leads to a lot of messages popping up as errormessages, although they are just debug information.

How can I configure the AWS CLI to output debug messages to stdout?

EDIT: how can I do this without redirecting stdout? If I redirect it I will nog be able to access the debug output on my CD/CI server.

标签: amazon-web-servicesstdoutaws-clistderr

解决方案


You can try to redirect stderr to stdout from the shell command

aws commad 2>&1


推荐阅读