[axum 0.7] Streaming from body to S3 #989
Replies: 3 comments
-
It sounds like this feature request will solve this: #977
|
Beta Was this translation helpful? Give feedback.
-
I just opened smithy-lang/smithy-rs#3300 — when this is released (sometime next week, most likely), you'll be able to use axum 0.7 again! |
Beta Was this translation helpful? Give feedback.
-
A side note—This may not the best way to stream a request to S3! I think you MAY get better performance by chunking the upload into parts and converting it into the multi-part upload API. That also makes it possible to retry and handle much larger files. |
Beta Was this translation helpful? Give feedback.
-
Hi!
I have a HTTP endpoint (built using axum) which is supposed (among other things) to take the request's body and store it in S3.
I would like to avoid storing the whole body in memory and instead stream it from the request's body to S3.
With axum
0.6
and aws-sdk-s30.34
I managed to make it work using something like this:I updated both crates to their latest versions, but I could not manage to fix my code.
I don't see any way to create a
ByteStream
(or a streamedSdkBody
) from an axum'sBody
; am I missing something?ByteStream::from_body_0_4
, but the point is to use axum0.7
which uses http-body1.0
.Beta Was this translation helpful? Give feedback.
All reactions