Skip to content

Commit

Permalink
s3: fix build after aws-sdk-go breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
phinze committed Oct 29, 2015
1 parent 04f6b3e commit ed87cf1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions get_s3.go
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
)

Expand Down Expand Up @@ -44,7 +45,9 @@ func (g *S3Getter) Get(dst string, u *url.URL) error {
return err
}

client := s3.New(g.getAWSConfig(region, creds))
config := g.getAWSConfig(region, creds)
sess := session.New(config)
client := s3.New(sess)

// List files in path, keep listing until no more objects are found
lastMarker := ""
Expand Down Expand Up @@ -97,7 +100,9 @@ func (g *S3Getter) GetFile(dst string, u *url.URL) error {
return err
}

client := s3.New(g.getAWSConfig(region, creds))
config := g.getAWSConfig(region, creds)
sess := session.New(config)
client := s3.New(sess)
return g.getObject(client, dst, bucket, path, version)
}

Expand Down

0 comments on commit ed87cf1

Please sign in to comment.