code: def get_by_name(account_name, bucket, region='us-west-2', json_path='accounts.json', alias=None):
      
      for account in get_all_accounts(bucket, region, json_path)['accounts']:
          if 'aws' in account['type']:
              if account['name'] == account_name:
                  return account
              elif alias:
                  for a in account['alias']:
                      if a == account_name:
                          return account
docs: Given an account name, attempts to retrieve associated account info.