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//!     let s3 = aws.s3();
39//!
40//!     // Use services with shared client
41//!     let parameter = ssm.get_parameter("/myapp/database/url").await?;
42//!     let queue_url = sqs.get_queue("my-queue").await?;
43//!     sqs.send_message(&queue_url, "Hello, world!", None).await?;
44//!     ssm.put_parameter("/myapp/database/url", "my-database-url", ParameterType::String, true).await?;
45//!     s3.put_object("my-bucket", "my-key", b"test-value".to_vec(), None).await?;
46//!     Ok(())
47//! }
48//! ```
49
50pub mod client;
51pub mod error;
52
53#[cfg(feature = "s3")]
54pub mod s3;
55#[cfg(feature = "sqs")]
56pub mod sqs;
57#[cfg(feature = "ssm")]
58pub mod ssm;
59
60// Re-export commonly used AWS types for convenience
61pub use aws_config;
62#[cfg(feature = "s3")]
63pub use aws_sdk_s3;
64#[cfg(feature = "sqs")]
65pub use aws_sdk_sqs;
66#[cfg(feature = "ssm")]
67pub use aws_sdk_ssm;