1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

Bump AWS crates and remove direct dependency on aws-types

This commit is contained in:
Quentin Gliech
2022-11-02 14:25:45 +01:00
parent 01b036ca8e
commit 6a235d40d9
3 changed files with 66 additions and 147 deletions

View File

@@ -30,13 +30,13 @@ impl Transport {
/// Construct a [`Transport`] from the environment
pub async fn from_env() -> Self {
let config = aws_config::from_env().load().await;
Self::new(&config)
let config = aws_sdk_sesv2::Config::from(&config);
Self::new(config)
}
/// Constructs a [`Transport`] from a given AWS shared config
/// Constructs a [`Transport`] from a given AWS SES SDK config
#[must_use]
pub fn new(config: &aws_types::SdkConfig) -> Self {
let config = aws_sdk_sesv2::Config::from(config);
pub fn new(config: aws_sdk_sesv2::Config) -> Self {
let client = Client::from_conf(config);
Self { client }
}