Dont use external tools

There is no need to use external tools like grep , tr,awk and jq

Example to see all buckets starting with “cf-“
  • Before
    aws s3api list-buckets |jq ".Buckets[].Name"  | grep cf | tr -d '"'
    
  • After
    aws s3api list-buckets --query 'Buckets[?starts_with(Name, `cf-`) == `true`].[Name]'  --output text