Questions tagged [rusoto]
26 questions
13
votes
2 answers
Docker and "The OpenSSL library reported an error" when deployed
I'm providing an API via Rust and Rocket via Amazon Elastic Container Service. Whenever I put or get objects to Amazon S3, it works great locally, but if deployed on Amazon ECS, I'm getting this run-time error:
HttpDispatch(HttpDispatchError {…

manonthemat
- 6,101
- 1
- 24
- 49
11
votes
1 answer
Uploading a string to S3 using rusoto
I'm using rusoto S3 to create a JSON string and upload this string to an S3 bucket. I can create the string, but rusoto's S3 PutObjectRequest requires a StreamingBody and I'm not sure how I can create a StreamingBody from a string or whether this is…

Explosion Pills
- 188,624
- 52
- 326
- 405
8
votes
1 answer
Rusoto streamed upload using sigv4
I'm having trouble streaming uploads to S3:
// rust version 1.42.0
// OS macos
// [dependencies]
// rusoto_core = "0.43.0"
// rusoto_s3 = "0.43.0"
// log = "0.4"
// pretty_env_logger = "0.4.0"
// tokio = "0.2.14"
// tokio-util = { version = "0.3.1",…

pms1969
- 3,354
- 1
- 25
- 34
8
votes
2 answers
Streamed upload to s3 with rusoto
How can I upload file to s3 using rusoto, without reading file content to memory (streamed)?
With this code:
use std::fs::File;
use std::io::BufReader;
use rusoto_core::Region;
use rusoto_s3::{PutObjectRequest, S3, S3Client, StreamingBody};
fn…

diralik
- 6,391
- 3
- 28
- 52
7
votes
1 answer
How do I use actix-web 3 and rusoto 0.46 together?
When I try to use actix-web 3 and rusoto 0.46 together I get the following runtime error:
thread 'actix-rt:worker:0' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime',…

Matt Roberts
- 1,107
- 10
- 15
4
votes
2 answers
Panic running async code while dropping Rust Future
I have an app using #[tokio::main], that creates several resources on AWS in one of its tasks. I've implemented cleaning up those resources in Drop handlers. However those cleanup functions are async, so I am using block_on to ensure they run…

Matt Joiner
- 112,946
- 110
- 377
- 526
3
votes
1 answer
How do I convert a futures_io::AsyncRead to rusoto::ByteStream?
I am trying to build a service that pulls files from an SFTP server and uploads them to S3.
For the SFTP part, I am using async-ssh2, which gives me a file handler implementing futures::AsyncRead. Since these SFTP files may be quite large, I am…

sonicxml
- 111
- 1
- 6
3
votes
1 answer
How can I fallback to credentials from a file if no environment variables are found?
How could I fallback to use credentials from a parsed file (config.yml) if no environment variables were found? For testing, I am using this example:
extern crate rusoto_core;
extern crate rusoto_s3;
use rusoto_core::credential::ChainProvider;
use…

nbari
- 25,603
- 10
- 76
- 131
3
votes
1 answer
Why does reading from a Rusoto S3 stream inside an Actix Web handler cause a deadlock?
I'm writing an application using actix_web and rusoto_s3.
When I run a command outside of an actix request directly from main, it runs fine, and the get_object works as expected. When this is encapsulated inside an actix_web request, the stream is…

Augusto
- 1,234
- 1
- 16
- 35
3
votes
2 answers
How to save a file downloaded from S3 with Rusoto to my hard drive?
I am trying to download a file from a bucket with Rusoto and I am getting the file content:
fn get_object(client: &TestClient, bucket: &str, filename: &str) {
let get_req = GetObjectRequest {
bucket: bucket.to_owned(),
key:…

Akiner Alkan
- 6,145
- 3
- 32
- 68
2
votes
1 answer
Rusoto async using FuturesOrdered combinator
I am trying to send off parallel asynchronous Rusoto SQS requests using FuturesOrdered:
use futures::prelude::*; // 0.1.26
use futures::stream::futures_unordered::FuturesUnordered;
use rusoto_core::{Region, HttpClient}; // 0.38.0
use…

James
- 693
- 1
- 13
- 27
2
votes
2 answers
How do I pass a struct with type parameters as a function argument?
How do I pass an instance of EcsClient with the signature impl
EcsClient
where P: ProvideAwsCredentials, D: DispatchSignedRequest to a function as a reference in Rust? My attempt is thus: extern crate rusoto; use…

Bojangles
- 99,427
- 50
- 170
- 208
1
vote
0 answers
Upload to S3 and from S3 insert table to Redshift
I am experimenting with rusoto.
The goal is to ingest a local file called "exchange_rates.csv" to S3 and then from S3 to AWS Redshift.
Below is the code I have tried:
extern crate rusoto_core;
extern crate rusoto_redshift;
extern crate…

Luc
- 737
- 1
- 9
- 22
1
vote
1 answer
Rusoto S3 reading object from S3
apologies if this is a dumb question, I am new enough to using rust and i am having a hard time figuring out how to read an object from s3 using the rusoto library.
https://rusoto.github.io/rusoto/rusoto_s3/
so far i've worked out this much:
let mut…

C. Dodds
- 325
- 3
- 12
1
vote
1 answer
rust AWS multipart upload using rusoto, multithreaded (rayon) panicked at 'there is no reactor running ...`
I'm trying to upload a file to aws in rust, for that I'm using the s3 rust client by rusoto_s3, I managed to get the multipart upload code working when these parts are sent from a single thread, however, that is not what I want, I want to upload big…

Sabir Moglad
- 739
- 2
- 7
- 23