Skip to content

Commit

Permalink
Can guess region and service from elastic search service URL's
Browse files Browse the repository at this point in the history
  • Loading branch information
derek-burdick committed Oct 22, 2015
1 parent b84d318 commit dcd9e25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ func serviceAndRegion(host string) (service string, region string) {
service = parts[0]
region = parts[1]
}
} else if len(parts) == 5 {
service = parts[2]
region = parts[1]
} else {
// Either service.amazonaws.com or s3-region.amazonaws.com
if strings.HasPrefix(parts[0], "s3-") {
Expand Down

0 comments on commit dcd9e25

Please sign in to comment.