This repo contains the new AWS SDK for Rust and its public roadmap
Please Note: The SDK is currently released as an alpha and is intended strictly for feedback purposes only. Do not use this SDK for production workloads.
This SDK for Rust is code generated from Smithy models that represent each AWS service. Code used to generate the SDK can be found in smithy-rs.
The new AWS SDK for Rust is built with one crate per AWS service. Tokio must also be added as a dependency within your Rust project to execute asynchronous code. During the alpha, the SDK will not be pushed to crates.io and must be used via a Git dependency.
- Create a new Rust project:
cargo new sdk-example
- Within your Cargo.toml file, add dependencies for DynamoDB and Tokio:
[dependencies]
dynamodb = { git = "https://github.com/awslabs/aws-sdk-rust", tag = "v0.0.3-alpha", package = "aws-sdk-dynamodb" }
tokio = { version = "1", features = ["full"] }
- Provide your AWS credentials as environment variables:
Note: The alpha SDK only supports environment variable credential providers at this time.
Linux/MacOS
export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...
export AWS_DEFAULT_REGION=... # eg. us-east-1
Windows
set AWS_ACCESS_KEY_ID=...
set AWS_SECRET_ACCESS_KEY=...
set AWS_DEFAULT_REGION=... # eg. us-east-1
- Make a request using DynamoDB
#[tokio::main]
async fn main() -> Result<(), dynamodb::Error> {
let client = dynamodb::Client::from_env();
let req = client.list_tables().limit(10);
let resp = req.send().await?;
println!("Current DynamoDB tables: {:?}", resp.table_names);
Ok(())
}
In order to use the SDK for Rust, you must already have Rust and Cargo installed. If you don't, these instructions will show you how to install Rust and Cargo: https://doc.rust-lang.org/book/ch01-01-installation.html
- GitHub discussions - For ideas, RFCs & general questions
- GitHub issues – For bug reports & feature requests
The alpha SDK uses GitHub Issues to track feature requests and issues with the SDK. In addition, we use GitHub Projects to provide users with a high level view of our roadmap and the features we're actively working on.
You can provide feedback or report a bug by submitting a GitHub issue. This is the preferred mechanism to give feedback so that other users can engage in the conversation, +1 issues, etc. Issues you open will be evaluated for our roadmap in the Developer Preview launch.
If you are interested in contributing to the new AWS SDK for Rust, please take a look at CONTRIBUTING
This alpha SDK currently does not provide support for every AWS service. You can see all the services currently supported on AWS_SERVICES_SUPPORTED
- Design docs - Design documentation for the SDK lives in the design folder of smithy-rs.
- Runtime / Handwritten code: The Rust Runtime code that underpins the SDK can be accessed here and here. This code is copied into this repo as part of code generation.
- Code Examples
- API reference docs - You can generate API reference docs by calling
cargo doc --open
on your project and navigating to the SDK crate
See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.