Skip to content

Commit 72b2b7f

Browse files
committed
Drop the upload context
1 parent 6e10f3e commit 72b2b7f

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

batch-processing/main.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package main
22

33
import (
44
"bytes"
5-
"context"
65
"encoding/csv"
76
"flag"
87
"fmt"
@@ -78,10 +77,6 @@ func main() {
7877
// from assumed role.
7978
svc := s3.New(sess, &aws.Config{Credentials: creds})
8079

81-
// Create a context with a timeout that will abort the upload if it takes
82-
// more than the passed in timeout.
83-
ctx := context.Background()
84-
8580
// Set up imagemagick
8681
imagick.Initialize()
8782
defer imagick.Terminate()
@@ -162,7 +157,7 @@ func main() {
162157

163158
// Uploads the object to S3. The Context will interrupt the request if the
164159
// timeout expires.
165-
_, err = svc.PutObjectWithContext(ctx, &s3.PutObjectInput{
160+
_, err = svc.PutObject(&s3.PutObjectInput{
166161
Bucket: aws.String(s3Bucket),
167162
Key: aws.String(s3Key),
168163
Body: outputFile,

0 commit comments

Comments
 (0)