cortexa-aws-errors 0.1.0

Compact, redacted AWS SDK error contracts and retryability types for cortexa-rust-aws.
Documentation
  • Coverage
  • 100%
    22 out of 22 items documented0 out of 0 items with examples
  • Size
  • Source code size: 29.3 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 338.4 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1s Average build duration of successful builds.
  • all releases: 1s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • cortexa/rust-crates/cortexa-rust-aws
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • DeVinci-Leonard

cortexa-rust-aws

Crates.io Docs.rs MSRV License

Languages: English | Français | Deutsch | Español | Italiano | 简体中文 | हिन्दी

A resource-oriented, high-performance AWS SDK for Rust built 100% from scratch on top of official AWS Smithy 2.0 specifications — with zero runtime dependency on aws-sdk-* or smithy.

  • Edition 2024, MSRV 1.91, #![forbid(unsafe_code)], missing_docs = "deny", missing_debug_implementations = "deny".
  • 2.55× faster client initialization, 2.23× lower OS Peak RSS, 9.19× lower peak live heap, and 2.1×–3.2× lower p50 latency compared to aws-sdk-rust in isolated CI benchmarks.

Key Features

  • Unified Resource & Typestate Model (prelude, AwsClientExt):
    • Fluent resource builders (client.s3().bucket(...), client.dynamodb().table(...), client.ec2().instance(...), client.sns().topic(...), etc.) alongside full Smithy 2.0 generated operation clients (client.<service>_ops()).
  • Zero-Allocation Hot Paths (cortexa-aws-core & cortexa-aws-protocols):
    • Lock-free OnceLock<Url> endpoint resolution cache across all 446 AWS services (O(log N) binary search, zero RwLock or Url::clone() on hot paths).
    • Stack-allocated relative path normalization ([u8; 256]) in REST-XML / REST-JSON codecs.
    • Static HeaderName::from_static fast paths in the reqwest transport.
  • Security by Default:
    • SSRF / IMDS Guard (block_metadata_ips = true by default): blocks cloud metadata endpoints (169.254.169.254, 169.254.170.2, 100.100.100.200, fd00:ec2::254, metadata.google.internal, link-local IPv4) while allowing 127.0.0.1 / localhost for local emulators.
    • Hardened TLS 1.3 profile (HttpTransportConfig::hardened_tls13()).
    • Pure-Rust SigV4 signing with SigningKey caching, end-to-end x-amz-checksum-sha256, SecretString zeroized on Drop, and SSE-C sensitive header redaction.
  • Centralized Resilience:
    • Exponential backoff + Full Jitter + Retry-After, automatic clock-skew correction (AtomicI64), automatic ExpiredToken refresh, bounded streaming pagination (collect_bounded()), windowed BatchExecutor, and non-blocking WaitCondition / BackgroundWaiter.

Quick Start

Add cortexa-rust-aws to your Cargo.toml:

[dependencies]
cortexa-rust-aws = { version = "0.1", features = ["s3", "dynamodb", "sts"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
use cortexa_rust_aws::prelude::*;

#[tokio::main]
async fn main() -> Result<(), AwsError> {
    let config = AwsConfig::builder(Region::try_new("eu-west-3")?)
        .with_auth(auth_auto())
        .build();
    let client = AwsClient::try_new(config)?;

    let identity = get_caller_identity(&client).await?;
    println!("Authenticated AWS Account: {}", identity.account);

    let mut bucket = client
        .s3()
        .bucket("my-cortexa-bucket")?
        .with_location_constraint("eu-west-3");
    bucket.create().await?;
    bucket.wait_until_exists(WaiterConfig::default()).wait().await?;
    bucket.delete().await?;

    Ok(())
}

Crate Features & crates.io Wave 1 Services

  • default = ["s3", "dynamodb", "ec2"]
  • Wave 1 published services (20 core AWS services): acm, cloudformation, cloudwatch, dynamodb, ec2, ecr, ecs, eventbridge, iam, kms, lambda, logs, route53, s3, secretsmanager, sfn, sns, sqs, ssm, sts
  • Workspace / GitLab: all 446 AWS services are available via individual feature flags or batch-01 .. batch-15 / all-services.
  • Optional runtime features: tracing, hickory-dns, test-utils.

Documentation & Contributing

License

Dual-licensed under either of:

at your option.