A high performance Amazon S3 client for Rust.
Run all tests
cargo test --all-features
Run individual test
cargo test --lib download::worker::tests::test_distribute_work
NOTE: You can use the profiling
profile from .cargo/config.toml
to enable release with debug info for any example.
Copy
See all options:
cargo run --example cp -- -h
Download a file from S3
AWS_PROFILE=<profile-name> RUST_LOG=trace cargo run --example cp s3://<my-bucket>/<my-key> /local/path/<filename>
NOTE: To run in release mode add --release/-r
to the command, see cargo run -h
.
NOTE: trace
may be too verbose, you can see just this library's logs with RUST_LOG=aws_s3_transfer_manager=trace
Upload a file to S3
AWS_PROFILE=<profile-name> RUST_LOG=trace cargo run --example cp /local/path/<filename> s3://<my-bucket>/<my-key>
NOTE: To run in release mode add --release/-r
to the command, see cargo run -h
.
NOTE: trace
may be too verbose, you can see just this library's logs with RUST_LOG=aws_s3_transfer_manager=trace
See cargo-flamegraph for more prerequisites and installation information.
Generate a flamegraph (default is to output to flamegraph.svg
):
sudo AWS_PROFILE=<profile-name> RUST_LOG=aws_s3_transfer_manager=info cargo flamegraph --profile profiling --example cp -- s3://test-sdk-rust-aaron/mb-128.dat /tmp/mb-128.dat
By default examples use tracing
crate for logs. You can pass the --tokio-console
flag to examples to
use console-subscriber
instead. This allows you to run them with
tokio-console to help debug task execution.
NOTE: This requires you build the examples with RUSTFLAGS="--cfg tokio_unstable"
or setting the equivalent in
your cargo config.
RUSTFLAGS="--cfg tokio_unstable" AWS_PROFILE=<profile-name> RUST_LOG=debug cargo run --example cp --tokio-console ...
Follow installation instructions for tokio-console and then run the
example with tokio-console
running.
See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.