0

For example in bash you can do:

echo hello \
world

$ hello world

Is there a way to do that for long --filters when using the AWS CLI?

For example, the following command is quite long and can become bloated when doing complex filtering/lookups:

aws ssm get-inventory --filters "Key=AWS:InstanceInformation.PlatformName,Values=Ubuntu,Type=Equal" "Key=AWS:InstanceInformation.InstanceStatus,Values=Active,Type=Equal" 

It would be better if you could do:

aws ssm get-inventory --filters "Key=AWS:InstanceInformation.PlatformName,Values=Ubuntu,Type=Equal" \
"Key=AWS:InstanceInformation.InstanceStatus,Values=Active,Type=Equal"

But I keep getting parsing errors when trying this.

Aron
  • 15
  • 3
  • Options: https://stackoverflow.com/a/46808582/271415 and https://stackoverflow.com/a/7316194/271415 – jarmod Mar 10 '22 at 16:32
  • Thanks, the second link option worked nicely: aws ssm get-inventory --filters "Key=AWS:InstanceInformation.PlatformName,Values=Ubuntu,Type=Equal" \ "Key=AWS:InstanceInformation.ComputerName,Values=example,Type=BeginWith" \ – Aron Mar 10 '22 at 17:13

0 Answers0