News for hackers. Stuff that matters.
Re:Show HN: Bash-My-AWS – CLI Commands for AWS by pensatoio on Tuesday December 31, 2019 @10:56PM (#21926546)
What really sells me on this tool is the ability to examine the underlying awscli command and transformations. I’ll be giving this a go in the new year!
Re:Show HN: Bash-My-AWS – CLI Commands for AWS by failmode on Wednesday January 01, 2020 @06:28PM (#21931545)
Thanks!

The intent has always been to enhance rather than replace AWCLI (which is an amazing tool!).

If you're ever wondering how a Bash-My-AWS command works, use `bma type` (it even supports tab completion for all the commands).

  $ bma type instances
  instances is a function
  instances () 
  { 
      local instance_ids=$(__bma_read_inputs);
      local filters=$(__bma_read_filters $@);
      aws ec2 describe-instances $([[ -n ${instance_ids} ]] && echo --instance-ids ${instance_ids}) --query "
          Reservations[].Instances[][
            InstanceId,
            InstanceType,
            State.Name,
            [Tags[?Key=='Name'].Value][0][0],
            LaunchTime,
            Placement.AvailabilityZone,
            VpcId
          ]" --output text | grep -E -- "$filters" | LC_ALL=C sort -b -k 6 | column -s' ' -t
  }