ds_common_aws_rs_lib/
lib.rs

1//! DS Common AWS Rust Library
2//!
3//! A comprehensive Rust library for AWS services integration, providing high-level abstractions
4//! for AWS SDK operations with common utilities and error handling.
5//!
6//! # Features
7//!
8//! - **AWS SDK Integration** - High-level abstractions for AWS services
9//! - **SSM Parameter Store** - Simplified parameter retrieval and management
10//! - **Error Handling** - Comprehensive error handling with AWS-specific error types
11//! - **Configuration Management** - Easy AWS configuration setup and management
12//! - **Async Support** - Full async/await support for all operations
13//! - **Type Safety** - Strong typing for AWS operations and responses
14//!
15//! # Features
16//!
17//! This crate supports the following features:
18//! - `ssm` - AWS Systems Manager Parameter Store support (enabled by default)
19//! - `sqs` - AWS Simple Queue Service support
20//! - `full` - Enables all features (equivalent to `ssm` + `sqs`)
21//!
22//! # Quick Start
23//!
24//! ## Using the unified AWS service (recommended)
25//! ```rust,no_run
26//! use aws_sdk_ssm::types::ParameterType;
27//! use ds_common_aws_rs_lib::client::AwsClient;
28//! use ds_common_aws_rs_lib::error::{Result, Error};
29//!
30//! #[tokio::main]
31//! async fn main() -> Result<(), Error> {
32//!     // Create AWS client once with shared configuration
33//!     let aws = AwsClient::new().await?;
34//!
35//!     // Get specialized services (very fast, no network calls)
36//!     let ssm = aws.ssm();
37//!     let sqs = aws.sqs();
38//!
39//!     // Use services with shared client
40//!     let parameter = ssm.get_parameter("/myapp/database/url").await?;
41//!     let queue_url = sqs.get_queue("my-queue").await?;
42//!     sqs.send_message(&queue_url, "Hello, world!", None).await?;
43//!     ssm.put_parameter("/myapp/database/url", "my-database-url", ParameterType::String, true).await?;
44//!     Ok(())
45//! }
46//! ```
47
48pub mod client;
49pub mod error;
50
51#[cfg(feature = "sqs")]
52pub mod sqs;
53#[cfg(feature = "ssm")]
54pub mod ssm;
55
56// Re-export commonly used AWS types for convenience
57pub use aws_config;
58#[cfg(feature = "sqs")]
59pub use aws_sdk_sqs;
60#[cfg(feature = "ssm")]
61pub use aws_sdk_ssm;