All of my aws-cli commands returned
Unknown output type: [None]
I checked my configuration
$ aws configure
appeared normal but i was unable to edit my 'Default output format'
I ran my aws-cli command with --debug and saw
MainThread - awscli.clidriver - DEBUG - Exception caught in main()
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/awscli/clidriver.py", line 208, in main
return command_table[parsed_args.command](remaining, parsed_args)
File "/Library/Python/2.7/site-packages/awscli/clidriver.py", line 345, in __call__
return command_table[parsed_args.operation](remaining, parsed_globals)
File "/Library/Python/2.7/site-packages/awscli/clidriver.py", line 517, in __call__
call_parameters, parsed_globals)
File "/Library/Python/2.7/site-packages/awscli/clidriver.py", line 638, in invoke
self._display_response(operation_name, response, parsed_globals)
File "/Library/Python/2.7/site-packages/awscli/clidriver.py", line 657, in _display_response
formatter = get_formatter(output, parsed_globals)
File "/Library/Python/2.7/site-packages/awscli/formatter.py", line 272, in get_formatter
raise ValueError("Unknown output type: %s" % format_type)
ValueError: Unknown output type: [None]
1 Answer. Use the output option in the named profile in the 'config' file. It sets the default output format to JSON. Do check out AWS Training by Intellipaat and master AWS.
If the aws command cannot be found after first installing or updating the AWS CLI, you might need to restart your terminal for it to recognize any PATH updates. If the aws command cannot be found after first installing or updating the AWS CLI, it might not have been fully installed.
AWS CLI supports the following formats: json. yaml or yaml-stream.
The Default output format specifies how the results are formatted. The value can be any of the values in the following list. If you don't specify an output format, json is used as the default. json – The output is formatted as a JSON string.
$aws configure
press Enters
see the "Default output format [None]:"
input one of "json, text or table "(all in lower case)
after that rerun your command.
Run the command "aws configure"
, then check if the word "JSON"
in "Default output format [JSON]:"
is in upper case or lower case? If it's in upper case then running any aws command shows "Unknown ouput type : JSON"
.
Or alternately open the file C:\Users\<user>\.aws\config
file and check the entry "output = json"
. If the word json
is in upper case then running any aws command shows "Unknown ouput type : JSON"
.
Solution:
Replace the upper case JSON with lower case json.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With