code: func GetRegion(profile string) (string, error) {
  	home, err := homedir.Dir()
  	if err != nil {
  		return "", err
  	}
  
  	path := filepath.Join(home, ".aws", "config")
  	cfg, err := goconfig.LoadConfigFile(path)
  	if err != nil {
  		return "", err
  	}
  
  	sectionName := "default"
  	if profile != "" && profile != "default" {
  		sectionName = fmt.Sprintf("profile %s", profile)
  	}
  
  	section, err := cfg.GetSection(sectionName)
  	if err != nil {
  		return "", fmt.Errorf("Could not find AWS region in %s", path)
  	}
  
  	return section["region"], nil
  }
docs: // GetRegion attempts loading the AWS region from ~/.aws/config.