I'm trying to do prepare a script (.bat /.sh) with multiple commands and one of them is AWS Cli, and output of the execution has to be taken to a variable. If the command is executed succesfully, it is returning the output that is expected, otherwise error is printing on console rather than to variable.
Any leads on this would be appreciated