1

Windows 10. cmd, mobaxterm, ps, fluent, taby , vscode terminal etc. I have seen other similar questions and also looked at many possible solutions to this.

enter image description here

I should point out that other non-awscli commands outputted to a file work just fine. Only the AWScli commands show that error and do not allow me to send output to a file.

I can easily do something like c:\> dir > filename.txt and it works.

I have checked environment variables but have not found anything that I can see as a possible item to change that would solve the problem.

This is not a duplicate of the other two questions asked, but I think the root cause might be the same. No answer that would solve this problem has been found yet.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Fayaz
  • 79
  • 1
  • 10
  • Does the `aws` command work at all? For example, what happens if you just run `c:\> aws`? – John Rotenstein Nov 16 '22 at 06:20
  • 1
    You are in PowerShell console and not cmd, so that might be the issue. – Caldazar Nov 16 '22 at 10:59
  • @Caldazar I have used multiple terminals and types etc as I said in the original question. Example/screenshot posted is PS but have used many other terminals. – Fayaz Nov 16 '22 at 14:00
  • @JohnRotenstein Yes everything works everywhere but except when I want to send results/output to a text file when using aws commands. – Fayaz Nov 16 '22 at 17:29
  • Maybe this method will work for you: [How to redirect the output of a PowerShell to a file during its execution](https://stackoverflow.com/a/13237178/174777) – John Rotenstein Nov 16 '22 at 21:33
  • @JohnRotenstein with any other type of command, dir, ps commands etc it works. It just doesnt work for aws commands. And it used to work. Also it used to work before. Then over some time I installed vscode add ons, aws command completion and visual studio aws tookkit, aws sak, aws sam-cli etc etc..and one of those things killed the ability to pipe aws cli commands with an angle bracket to a file. :( – Fayaz Nov 18 '22 at 02:09
  • The "aws command completion" sounds like it might impact how commands are typed. I'd suggest trying without that to see if it fixes things. – John Rotenstein Nov 18 '22 at 03:22

0 Answers0