I'm downloading csv file from amazon S3 to buffer using aws-go-sdk. I want to parse and proceed it's content simultaniously with downloading. But downloading goes much faster then i can proceed file content, it results in alocating too much memory. Is there some way to pause/resume downloading process?
buff := &aws.WriteAtBuffer{}
s3dl := s3manager.NewDownloader(awsSession)
n, err := s3dl.Download(buff, &s3.GetObjectInput{
Bucket: aws.String(bucket),
Key: aws.String(key),
})
r := io.Reader(buff.Bytes())