diff --git a/shared/comm-lib/Cargo.lock b/shared/comm-lib/Cargo.lock --- a/shared/comm-lib/Cargo.lock +++ b/shared/comm-lib/Cargo.lock @@ -971,7 +971,6 @@ "aws-config", "aws-sdk-dynamodb", "aws-sdk-secretsmanager", - "aws-types", "base64 0.21.0", "bytes", "chrono", diff --git a/shared/comm-lib/Cargo.toml b/shared/comm-lib/Cargo.toml --- a/shared/comm-lib/Cargo.toml +++ b/shared/comm-lib/Cargo.toml @@ -22,12 +22,7 @@ "dep:actix-web-httpauth", ] crypto = ["dep:aead", "dep:aes-gcm", "dep:bytes"] -aws = [ - "dep:aws-config", - "dep:aws-sdk-dynamodb", - "dep:aws-sdk-secretsmanager", - "dep:aws-types", -] +aws = ["dep:aws-config", "dep:aws-sdk-dynamodb", "dep:aws-sdk-secretsmanager"] [dependencies] serde = { version = "1.0", features = ["derive"] } @@ -45,7 +40,6 @@ aws-config = { version = "0.55", optional = true } aws-sdk-dynamodb = { version = "0.27", optional = true } aws-sdk-secretsmanager = { version = "0.27", optional = true } -aws-types = { version = "0.55", optional = true } # blob client dependencies bytes = { version = "1.4", optional = true } futures-core = { version = "0.3", optional = true } diff --git a/shared/comm-lib/src/lib.rs b/shared/comm-lib/src/lib.rs --- a/shared/comm-lib/src/lib.rs +++ b/shared/comm-lib/src/lib.rs @@ -16,5 +16,17 @@ #[cfg(feature = "http")] pub use {actix_web, http}; + + #[cfg(feature = "aws")] + pub mod aws { + pub use aws_config as config; + pub use aws_sdk_dynamodb as ddb; + pub use aws_sdk_secretsmanager as secretsmanager; + + // commonly used types + pub use config::SdkConfig as AwsConfig; + pub use ddb::Client as DynamoDBClient; + pub use ddb::Error as DynamoDBError; + } } pub use reexports::*;