This repo contains the AWS SDK for Rust and itspublic roadmap.
The SDK is code generated fromSmithy modelsthat represent each AWS service. The code used to generate the SDK can be found insmithy-rs.
Examples are available for many services and operations, check out theexamples folder.
For a step-by-step guide including several advanced use cases, check out theDeveloper Guide.
The SDK provides one crate per AWS service. You must addTokioas a dependency within your Rust project to execute asynchronous code.
-
Create a new Rust project:
cargo new sdk-example
-
Add dependencies to DynamoDB and Tokio to yourCargo.tomlfile:
[dependencies] aws-config= {version="1.5.8",features= ["behavior-version-latest"] } aws-sdk-dynamodb="1.50.0" tokio= {version="1",features= ["full"] }
-
Provide your AWS credentials with the default credential provider chain, which currently looks in:
- Environment variables:
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
,andAWS_REGION
- The default credentials files located in
~/.aws/config
and~/.aws/credentials
(location can vary per platform) - Web Identity Token credentials from the environment or container (including EKS)
- ECS Container Credentials (IAM roles for tasks)
- EC2 Instance Metadata Service (IAM Roles attached to instance)
- Environment variables:
-
Make a request using DynamoDB
useaws_sdk_dynamodb::{Client,Error};
#[tokio::main]
asyncfnmain()->Result<(),Error>{
letshared_config = aws_config::load_from_env().await;
letclient =Client::new(&shared_config);
letreq = client.list_tables().limit(10);
letresp = req.send().await?;
println!("Current DynamoDB tables: {:?}",resp.table_names);
Ok(())
}
In order to use the SDK, you must already have Rust and Cargo installed. If you don't,these instructionsdescribe how to install Rust and Cargo.
Detailed usage instructions are available in theDeveloper Guide. Suggestions for additional sections or improvements for the guide are welcome. Please open an issue describing what you are trying to do.
- Developer Guide
- GitHub discussions- For ideas, RFCs & general questions
- GitHub issues– For bug reports & feature requests
- Generated Docs (latest version)
- Usage examples
The SDK usesGitHub Issuesto track feature requests and issues with the SDK. In addition, we useGitHub Projectsto 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 aGitHub 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.
If you are interested in contributing to the SDK, please take a look atCONTRIBUTING
The SDK currently requires a minimum of Rust 1.78.0, and is not guaranteed to build on compiler versions earlier than that. We keep the minimum compiler version two releases behind the latest stable release where possible (so if the latest stable were 1.55, we would support 1.53). Increases in minimum required Rust version will be called out in the Release Notes for new releases of the SDK.
- Design docs - Design documentation for the SDK lives in thedesign folder of smithy-rs.
- Runtime / Handwritten code: The Rust Runtime code that underpins the SDK can be accessedhereandhere.This code is copied into this repo as part of code generation.
- Code Examples
- API reference documentation (rustdoc)
SeeCONTRIBUTINGfor more information.
This project is licensed under the Apache-2.0 License.