Skip to content

Instantly share code, notes, and snippets.

@ivormetcalf
ivormetcalf / upload_stream.rs
Last active April 25, 2024 20:28
Rust Module to upload a stream to Amazon S3.
use rusoto_core::ByteStream;
use rusoto_s3::{S3Client, S3};
use futures::{future, stream, Stream, StreamExt, TryStreamExt};
pub async fn upload_stream(
client: S3Client,
bucket: String,
key: String,
data_stream: impl Stream<Item = String>,