Using aws cli, I would like to be able to fuzzy search for a part of a string in the 'description' of a Security Group.
For example let's say Security Group sd-afafaf00 contains "Hey there kaipee" in the Description field.
The following works but only for a complete match, not partial
aws ec2 describe-security-groups --query "SecurityGroups[?IpPermissions[?contains(IpRanges[].Description, 'Hey there kaipee')]]"
I would like to be able to display all Security Groups that contain 'kaipee' in the description, like:
aws ec2 describe-security-groups --query "SecurityGroups[?IpPermissions[?contains(IpRanges[].Description, 'kaipee')]]"
EDIT : I require returning the GroupId, CirdIp and details of the Description field which all match the results of the queried string.