-
Hello - in my never ending pursuit for a way to stream files to s3 when we don't know the content length at the time we start the request, I've refreshed some old code and started playing with TransferManager again using AsyncRequestBody.fromPublisher and Flux... This is sort of related to the recent #2908 and the more long term request aws/aws-sdk-java#474 What is really great - is that I can do this if I incorrectly set the size to something arbitrarily high. For example, this works fine:
So even though I'm setting the contentLength to ~5M bytes and uploading content of "onetwothree", TransferManager takes care of it and the file looks fine in S3. When I pull it down the actual content is 11 bytes as expected, not like it's padded with spaces or anything. So it seems that if my async publisher completes, the s3Client correctly stops and closes the stream at that point. Let me know if you see any issues with this. So this is really great but limited - if I try to go higher than 5M - I start getting exceptions that my upload is smaller than the minimum size - the limit is somewhat random - which makes me think underlying native libs are doing something with respect to available runtime memory?
So my question is - how is this calculated? And is there any chance we could take this a step further so I can just set the size to something like a terrabyte while maintaining the publisher aspect and minimum part size? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This is working now with integration a couple days ago of awslabs/aws-c-s3#285. No longer need to specify content size. |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
This is working now with integration a couple days ago of awslabs/aws-c-s3#285. No longer need to specify content size.