Skip to content

Instantly share code, notes, and snippets.

@7hoenix
Created March 10, 2018 21:23
Show Gist options
  • Save 7hoenix/e69bbc8ba3df1d1a6ae4b66dc17c2a39 to your computer and use it in GitHub Desktop.
Save 7hoenix/e69bbc8ba3df1d1a6ae4b66dc17c2a39 to your computer and use it in GitHub Desktop.
rusoto S3
extern crate rusoto_core;
extern crate rusoto_s3;
extern crate simple_logger;
use rusoto_core::Region;
use rusoto_s3::{S3, S3Client};
fn main() {
simple_logger::init().unwrap();
let region = Region::Custom {
name: "nyc3".to_owned(),
endpoint: "https://nyc3.digitaloceanspaces.com".to_owned(),
};
let region = Region::UsEast1;
let s3 = S3Client::simple(region);
println!("here");
match s3.list_buckets().sync() {
Ok(buckets) => println!("{:?}", buckets),
Err(e) => panic!("{:?}", e),
};
println!("there");
}
2018-03-10 13:17:55 TRACE [mio::sys::unix::kqueue] registering; token=Token(SOME_TOKEN); interests=Readable
2018-03-10 13:17:55 TRACE [mio::poll] registering with poller
2018-03-10 13:17:55 DEBUG [tokio_reactor::background] starting background reactor
2018-03-10 13:17:55 TRACE [tokio_threadpool] build; num-workers=8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment