Skip to content

In-memory zero-copy S3 PutObject / GetObject with custom buffers in 2020 #1430

@tilsche

Description

@tilsche

Confirm by changing [ ] to [x] below:

Platform/OS/Hardware/Device
Linux x86-64

Describe the question

I have large memory buffers that I need to transfer to S3 and vice versa at optimal performance. I need to avoid redundant allocations and copies. How is this possible in a clean idiomatic way?

This question has been asked in various issues, e.g., #64, #533, #785. However, they are all closed with no clear documented solution and it has been suggested to open a new issue if needed. In general, the suggested approaches revolve around a custom stream implementation, which is unfortunately not trivial to get right and would preferably not done in user code again and again.

I am particularly referencing a comment from @JonathanHenson from 2018:

[...] in the very near future, we’ll be providing an interface that will make sure you don’t have to ever touch one again if you don’t want to. Basically we have a stream_buf implementation that will run your simpler interface implementation for you automatically.

I would hope that the very near future is now but unfortunately I was unable to find such an implementation - but I consider it entirely possible that it exists in the vastness of the Aws SDK.

Logs/output
N/A

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions