Skip to content

Commit

Permalink
Merge pull request #3 from clmoreno/master
Browse files Browse the repository at this point in the history
updated the way to create the aws session
  • Loading branch information
pottava authored Jan 30, 2017
2 parents 6285daa + 2a13145 commit b09dc18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ func awss3(w http.ResponseWriter, r *http.Request) {
}

func s3get(backet, key string) (*s3.GetObjectOutput, error) {
sess := session.New(aws.NewConfig().WithRegion(c.awsRegion))
sess, err := session.NewSession(&aws.Config{Region: aws.String(c.awsRegion)})
if err != nil {
log.Printf("[service] unable to create aws session: %s", err)
}
req := &s3.GetObjectInput{
Bucket: aws.String(backet),
Key: aws.String(key),
Expand Down

0 comments on commit b09dc18

Please sign in to comment.