Skip to content

Commit

Permalink
Merge pull request #20 from zencoder/bump-aws-version
Browse files Browse the repository at this point in the history
Bumped to tagged AWS version and updated to use new changed method signature
  • Loading branch information
philcluff committed Jan 22, 2016
2 parents 0274f03 + 8d70178 commit 9cc23a8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
11 changes: 7 additions & 4 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package: github.com/zencoder/go-remote-config
import:
- package: github.com/aws/aws-sdk-go
version: f28e73d4791500a90d49190e0a01b769748cc2a8
version: v1.0.9
subpackages:
- aws
- internal/endpoints
Expand Down
4 changes: 3 additions & 1 deletion s3_signing.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/aws/session"
)

var (
Expand Down Expand Up @@ -40,11 +41,12 @@ func generateSignedS3URL(region AWSRegion, bucket string, key string, expiry uin
}

// We want to use the default credentials chain so that it will attempt Env & Instance role creds
svc := s3.New(&aws.Config{
sess := session.New(&aws.Config{
Region: aws.String(string(region)),
Endpoint: aws.String(endpoint),
S3ForcePathStyle: aws.Bool(s3ForcePathStyle),
})
svc := s3.New(sess)

req, _ := svc.GetObjectRequest(&s3.GetObjectInput{
Bucket: &bucket,
Expand Down

0 comments on commit 9cc23a8

Please sign in to comment.