Why does AWS show a long json file with no human readable output flag? #8813
Replies: 1 comment 1 reply
-
|
AWS CLI is designed to return machine-readable data by default (JSON), because it is a generic cross-platform CLI that targets automation first. The “human readable” view is done via output formatters plus filtering, rather than a single universal “pretty view” for every service and every shape. You already have a built-in table/text output for essentially all AWS CLI commands: aws ec2 describe-instances --output table aws ec2 describe-instances --output text What makes it look “massive” is that Example: list instance id, name tag, state, type, AZ, private IP: aws ec2 describe-instances If you want a simpler “VM list” that is easy to remember, keep it minimal: aws ec2 describe-instances Why there isn’t one universal “--human-readable for everything”: Different AWS services return very different data shapes (often nested, large, and service-specific). A single default “table” layout would either hide important fields, be inconsistent, or be extremely wide/noisy. That’s why AWS CLI provides:
About AWS PowerShell: AWS Tools for PowerShell exists, but it’s PowerShell-native and follows PowerShell behaviors (like prompting). If you see “Confirm Continue with this operation?”, that’s PowerShell’s confirmation behavior. You can disable prompts for your session with: $ConfirmPreference = 'None' Or run the cmdlet with confirmation disabled (where supported): Get-EC2Instance -Confirm:$false In short:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So I tried to list VMs with
aws ec2 describe-instancesand I get this massive json file. In azure powershell, I would get a human readable table, but with the same level of fidelity as the aws json file, because they are objects. Why isn't there a --table or --human-readable flag for everything aws (I'm sure this isn't the only issue)? Seems like the azure powershell method is simply superior. Maybe they should release aws powershell.Guide suggests using jq query with
--query. What a terrible idea in terms of usability lol. Imagine remembering and typing all this out all this just to do something as simple as list VMs.https://docs.aws.amazon.com/cli/latest/userguide/cli-services-ec2-instances.html
EDIT: turns out there is aws powershell, but it sucks
Beta Was this translation helpful? Give feedback.
All reactions