Search code examples
amazon-s3boto3

Streaming data to an object in S3


We have a input stream which need to be written to S3. This stream has large data and I cannot keep it in memory. We don't want to write to local disk and then transfer to S3 because of security reasons.

Is there a way to stream data to s3 object?

I think our problem can be solved using s3 multipart upload. But, that is used for different purpose - uploading large files. Instead is there a out of the box way to stream data to s3?


Solution

  • This stream has large data and I cannot keep it in memory.

    So multipart upload is the correct way to solve this.