#aws

dev aws-config

AWS SDK config and credential provider implementations

24 releases (breaking)

Uses new Rust 2021

0.51.0 Oct 26, 2022
0.49.0 Sep 21, 2022
0.46.0 Jul 22, 2022
0.9.0 Mar 17, 2022
0.0.26-alpha Nov 24, 2021

#1 in Authentication

Download history 35068/week @ 2022-08-17 37453/week @ 2022-08-24 37569/week @ 2022-08-31 35897/week @ 2022-09-07 34373/week @ 2022-09-14 42027/week @ 2022-09-21 40999/week @ 2022-09-28 41737/week @ 2022-10-05 41094/week @ 2022-10-12 43197/week @ 2022-10-19 44629/week @ 2022-10-26 46429/week @ 2022-11-02 46435/week @ 2022-11-09 47968/week @ 2022-11-16 39930/week @ 2022-11-23 43155/week @ 2022-11-30

186,361 downloads per month
Used in 413 crates (393 directly)

Apache-2.0

1MB
24K SLoC

aws-config

AWS SDK config and credential provider implementations.

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.

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

Until the SDK is released, we will be adding information about using the SDK to the Developer Guide. Feel free to suggest additional sections for the guide by opening an issue and 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. In most cases, it should not be used directly.

Dependencies

~12–21MB
~434K SLoC