Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Why does the AWS CLI result in the LIST viewer?

Aug
197
5
This is an issue I've noticed for a while but generally hasn't bothered me enough to figure it out. Now it's become a problem for me, so I need to ask the question. Whenever I use the AWS CLI utility from within TCC/TakeCommand, the results don't simply get listed in the console as normal output as happens with every other shell I use (e.g., CMD, PowerShell, Git Bash, etc.). No, when running a simple AWS CLI command in TCC/TakeCommand, for example aws sts get-caller-identity to see under which account I'm logged in at the moment, the LIST command viewer pops up instead. Which seems to mess rather badly with my mouse movement I might add for some unknown reason as long as it's running. Screenshot below to show the result.

But that's beside the point. My question today is: why does the AWS CLI result in the LIST viewer? And how can I stop that from happening? I just want the information to get dumped to the console like it does with every other shell. Thanks in advance.
 

Attachments

  • AutoListViewerProblem.webp
    AutoListViewerProblem.webp
    15.7 KB · Views: 6
An excellent question
Reminds me of NPR. :smile:

That was my only guess. I would think that an external command triggering LIST is impossible unless you ask it to do so. Does AWS have any configuration options where you may have mentioned LIST?
 
Reminds me of NPR. :smile:

That was my only guess. I would think that an external command triggering LIST is impossible unless you ask it to do so. Does AWS have any configuration options where you may have mentioned LIST?
Nope. And it doesn't seem to matter what output format I configure the AWS CLI to use (e.g., text, JSON, etc.) either. I've never seen anything else like it. I feel like it's got to be an alias, but the '*' disables expansion, right? I mean, that's my memory and seems to match the documentation.
 
Nope. And it doesn't seem to matter what output format I configure the AWS CLI to use (e.g., text, JSON, etc.) either. I've never seen anything else like it. I feel like it's got to be an alias, but the '*' disables expansion, right? I mean, that's my memory and seems to match the documentation.

What is AWS? It's not an internal command. Maybe it's a batch file; WHICH AWS should tell you.
 
What is AWS? It's not an internal command. Maybe it's a batch file; WHICH AWS should tell you.
Sorry, I should have been more clear. The AWS CLI is the Amazon Web Services (AWS) Command Line Interface (CLI) which lets you administer cloud infrastructure and such from the terminal. It's a go-to tool for a lot of DevSecOps work. I use it all the time.
 
Sorry, I should have been more clear. The AWS CLI is the Amazon Web Services (AWS) Command Line Interface (CLI) which lets you administer cloud infrastructure and such from the terminal. It's a go-to tool for a lot of DevSecOps work. I use it all the time.

But what is the AWS command — an .EXE, a batch file? If it's a batch file, perhaps you modified it to call VIEW at some point, and then forgot about it. Or perhaps the batch file calls MORE or LESS, and you've aliased that to VIEW.
 
But what is the AWS command — an .EXE, a batch file? If it's a batch file, perhaps you modified it to call VIEW at some point, and then forgot about it. Or perhaps the batch file calls MORE or LESS, and you've aliased that to VIEW.
Ah, I missed your intent. The AWS command is an external executable, full default path being C:\Program Files\Amazon\AWSCLIV2\aws.exe.
 
Well that punctures that little theory.

Still you might check for aliases named MORE or LESS. It's at least possible that AWS.EXE opens a new shell to handle such commands.
 
Well that punctures that little theory.

Still you might check for aliases named MORE or LESS. It's at least possible that AWS.EXE opens a new shell to handle such commands.
AHA! That did it! I clearly have to modify my TCC/TakeCommand debugging procedure. I have always just disabled alias expansion by pre-pending an asterisk and figuring that would do it. But in fact I had an alias for more that was somehow my problem! I don't understand it, but the following alias was the issue:

more=list /s

I dimly remember creating that roughly forever ago when the LIST viewer was new and shiny because I figured every time I'd issue a command like dir | more it would end up sending all that to it. I guess the AWS CLI must be somehow spawning a sub-shell or something to show it's results?! So that disabling of alias expansion is essentially temporary and not picked up in the sub-shell?! That would never have occurred to me.

I see now that whenever I have these issues, it's not enough to disable alias expansion. I need to completely unalias * and try it then. That would have saved me a lot of effort. Thanks for helping me find the issue. That, coupled with your reply in the other thread I posted today, have got me rolling again without either of the problems tripping me up. Cheers!
 
You bet. Just to clarify a little bit, prepending an asterisk only disables alias expansion for that one command.
 
You bet. Just to clarify a little bit, prepending an asterisk only disables alias expansion for that one command.
Totally makes sense. It just never occurred to me that the AWS command would be spawning a sub-shell in no visible fashion to provide the output.
 
Back
Top