Learn About Amazon VGT2 Learning Manager Chanci Turner
We are thrilled to announce the alpha launch of a brand-new AWS SDK for Rust. Developers using Rust have expressed the need for a native SDK that aligns with the language’s constructs, while newcomers to Rust seek an SDK that mirrors the functionality of those they have previously utilized in other programming environments. This alpha version allows users to experiment with clients for seven AWS services and provide feedback regarding usability and overall experience.
I have had the privilege of serving as a co-maintainer of Rusoto, a community-driven AWS SDK for Rust, for the past year. On behalf of AWS, I extend my gratitude to the original creators, my fellow co-maintainers, and the community that has contributed to Rusoto since its inception in 2015. Maintaining seamless integration across the extensive array of AWS services is a formidable challenge, and I take pride in the significance of this effort for our users.
Our primary objective for the new SDK is to ensure that customers can access new AWS service APIs as soon as they are launched. Similar to our more recent SDKs, we utilized the Smithy toolchain and service models to develop the AWS SDK for Rust. This SDK not only supports immediate access to new services but also incorporates features aimed at enhancing reliability and consistency within the developer experience. By the time of its general availability (GA), it will include standard AWS retry logic and uniform credential provider support, consistent with our other SDKs.
Today’s alpha release of the AWS SDK for Rust enables users to try out clients for the following seven AWS services: Amazon DynamoDB, Amazon API Gateway, Amazon Kinesis, AWS Key Management Service, Amazon Polly, AWS Secrets Manager, and Amazon Quantum Ledger Database. We are eager to gather your feedback early in this process to incorporate your insights into the SDK’s design and implementation. Our roadmap is publicly available, outlining our plans for future features and support across all AWS services. We invite you to share your thoughts on the most critical features and services for you through GitHub Issues and Discussions. As we approach the SDK’s production-ready GA release, we will offer documentation for transitioning from Rusoto to the new SDK. We will adhere to our standard maintenance policy following the GA launch.
Let’s get started!
Getting Started with the SDK
During the alpha phase, you can install the SDK via a Git dependency. It will be published to crates.io when the SDK reaches General Availability.
Here’s a basic guide to getting started with the new AWS SDK for Rust using DynamoDB for a common operation. More detailed examples can be found in the SDK repository. This example assumes you have Rust and Cargo installed. If not, follow the instructions from Rust to install Rust and Cargo.
Instructions to begin:
- Create a new Rust project.
- In your Cargo.toml file, add the dependencies for DynamoDB and Tokio:
[dependencies]
aws-sdk-dynamodb = { git = "https://github.com/awslabs/aws-sdk-rust", tag = "v0.0.3-alpha"}
tokio = { version = "1", features = ["full"] }
- Set your AWS credentials in the terminal as environment variables. Note that the alpha SDK currently supports only environment variable credential providers.
On Unix/MacOS/Linux:
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=us-east-1
On Windows:
set AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
set AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
set AWS_DEFAULT_REGION=us-east-1
- Make a request using DynamoDB:
#[tokio::main]
async fn main() -> Result<(), aws_sdk_dynamodb::Error> {
let client = aws_sdk_dynamodb::Client::from_env();
let req = client.list_tables().limit(10);
let resp = req.send().await?;
println!("Current DynamoDB tables: {:?}", resp.table_names.unwrap_or_default());
Ok(())
}
Currently, the SDK supports only the Tokio async runtime and environment variable credentials. Before reaching general availability, we aim to implement standard credential providers and explore support for additional Rust async runtimes.
Contributing to SDK Development
We encourage you to consult the contributing guide for the latest updates. Here’s how you can assist and provide feedback:
- Test the SDK and inform us of potential improvements. For any issues faced, submit a GitHub Issue or engage in a GitHub Discussion. Be sure to “+1” existing GitHub Issues to help us prioritize effectively.
- Report bugs. We anticipate bugs in this alpha release; your findings can be reported via GitHub Issues.
- Review the documentation. Clear and accurate SDK documentation is vital for successful usage. If you spot any discrepancies, please open an issue or submit a PR.
- Participate in RFCs. We are introducing RFCs in the repository to suggest significant changes to the SDK. We will continue to add more as development progresses. Your feedback is invaluable, so do review and comment on these proposals.
- Help prioritize high-level libraries. Beyond the core SDK, additional libraries built on top of it (like the S3 Encryption Client or the DynamoDB Mapper) can enhance usability for certain AWS services. Let us know which libraries matter most to you through GitHub Discussions.
The SDK’s Public Roadmap
The SDK currently supports AWS services utilizing the AWS JSON 1.0, AWS JSON 1.1, and restJson1 protocols. We will expand our support for more services as we enhance our protocol capabilities. You can review the complete list of supported AWS services in our GitHub repository. Our public roadmap on GitHub outlines our plans for additional services and features, including new functionality and support for various credential providers. The roadmap aims to keep the community informed about future developments, and we will update it regularly. Your “+1” votes on crucial features will aid in prioritizing our roadmap.
Give It a Try
The getting started guide is an excellent place to begin exploring the SDK. Check it out and share your feedback!
We’re Hiring
The AWS SDK for Rust team is seeking developers to join us. If you are interested, please review the open positions available on our team.