52 releases (15 stable)

new 1.2.1 Apr 22, 2024
1.1.9 Mar 26, 2024
1.1.1 Dec 14, 2023
1.0.1 Nov 24, 2023
0.0.26-alpha Nov 24, 2021

#2 in Authentication

Download history 191879/week @ 2024-01-02 214495/week @ 2024-01-09 229684/week @ 2024-01-16 237951/week @ 2024-01-23 230664/week @ 2024-01-30 218335/week @ 2024-02-06 220262/week @ 2024-02-13 231863/week @ 2024-02-20 244482/week @ 2024-02-27 248942/week @ 2024-03-05 249545/week @ 2024-03-12 241977/week @ 2024-03-19 235537/week @ 2024-03-26 270482/week @ 2024-04-02 269721/week @ 2024-04-09 239698/week @ 2024-04-16

1,058,976 downloads per month
Used in 702 crates (612 directly)

Apache-2.0

2.5MB
47K SLoC

aws-config

AWS SDK config and credential provider implementations.

The implementations can be used either via the default chain implementation from_env/ConfigLoader or ad-hoc individual credential and region providers.

A ConfigLoader can combine different configuration sources into an AWS shared-config Config. The Config can then be used to configure one or more AWS service clients.

Examples

Load default SDK configuration:

async fn example() {
    let config = aws_config::load_from_env().await;
    let client = aws_sdk_dynamodb::Client::new(&config);
}

Load SDK configuration with a region override:

use aws_config::meta::region::RegionProviderChain;

async fn example() {
    let region_provider = RegionProviderChain::default_provider().or_else("us-east-1");
    let config = aws_config::from_env().region(region_provider).load().await;
    let client = aws_sdk_dynamodb::Client::new(&config);
}

Getting Started

Examples are available for many services and operations, check out the examples folder in GitHub.

The SDK provides one crate per AWS service. You must add Tokio as a dependency within your Rust project to execute asynchronous code. To add aws-sdk-config to your project, add the following to your Cargo.toml file where VERSION is the version of the SDK you want to use:

[dependencies]
aws-config = "VERSION"
aws-sdk-config = "VERSION"
tokio = { version = "1", features = ["full"] }

Using the SDK

Detailed usage instructions are available in the Developer Guide. Suggestions for additional sections or improvements for the guide are welcome. Please open an issue describing what you are trying to do.

Getting Help

License

This project is licensed under the Apache-2.0 License.

This crate is part of the AWS SDK for Rust and the smithy-rs code generator.

Dependencies

~9–22MB
~331K SLoC