Upload uploads an object to S3, intelligently buffering large files into smaller chunks and sending them in parallel across multiple goroutines. You can configure the buffer size and concurrency through the Uploader's parameters.

Additional functional options can be provided to configure the individual upload. These options are copies of the Uploader instance Upload is called from. Modifying the options will not impact the original Uploader instance.

It is safe to call this method concurrently across goroutines.


// Upload input parameters
upParams := &s3manager.UploadInput{
    Bucket: &bucketName,
    Key:    &keyName,
    Body:   file,

// Perform an upload.
result, err := uploader.Upload(upParams)

// Perform upload with options different than the those in the Uploader.
result, err := uploader.Upload(upParams, func(u *s3manager.Uploader) {
     u.PartSize = 10 * 1024 * 1024 // 10MB part size
     u.LeavePartsOnError = true    // Don't delete the parts if the upload fails.

Upload is referenced in 36 repositories