You must install the AWS CLI to use these functions. You also have to have access keys to AWS and permission to access instance information.
The AWS CLI install is usually painless, see http://docs.aws.amazon.com/cli/latest/userguide/installing.html
sudo easy_install pip
sudo pip install awscli
After install run the setup to set your configuration options which includes the default region and your access keys.
aws configure
Possible issues with Mac not having the proper python path noted here, http://stackoverflow.com/questions/29858184/aws-cli-not-working-on-mac-osx-yosemite
You can the aws_login_helpers.sh functions to your bash_profile/bash_rc or use them in a script.
You will likely only need one of the helper functions to use the assh function but I've added a few as examples. I use the ec2_priv_ip_from_tag helper function in the assh function below since I'm logging in through a bastion instance and need the internal IP for my destination. Simply change "ubuntu@$(ec2_priv_ip_from_tag "$1")" to the helper function you need, e.g. ec2_pub_ip_from_tag to get the public IP.
The 'assh' function assumes you are using a bastion/jump server to connect through and that those settings are set in your ssh config file. Remove the proxy command option if this is not the case or specify the user@host in the place of the "bastion" alias in that command.
The host entry is written to /dev/null on each login so it's not stored and thus you will not fill up your knownhosts file with these ephemeral entries.