How to list security groups for the specific instance via CLI? I'm looking for syntax like:

aws ec2 describe-security-groups --instance-id i-0xyz


however, the above sub-command doesn't support --instance-id parameter.

I've checked and there are --filters and --query parameters, but I'm not sure about the syntax.

What would be the easiest way to display the description of the security group of the instance?
You can use aws ec2 describe-instances instead, you can specify the id --instance-ids &lt;value&gt; and it will output the security group.