cortexa-aws-appstream 0.1.0

AWS APPSTREAM service client and resource abstractions for cortexa-rust-aws.
Documentation

cortexa-rust-aws

Crates.io Docs.rs MSRV License

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

An async, resource-oriented AWS SDK for Rust. It pairs ergonomic typed resource handles (bucket.create(), table.put_item(), instance.start()) with generated Smithy 2.0 operation clients (client.s3_ops(), client.sts_ops(), ...), running on a lightweight rustls + tokio core.

Example

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"] }

Create a client, check your caller identity, and manage an S3 bucket:

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!("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(())
}

Highlights

  • Typed resources + Smithy operations: high-level resource structs alongside <service>_ops() generated clients.
  • Low overhead: lock-free OnceLock<Url> endpoint cache, stack-allocated path normalization in XML/JSON codecs, and static HeaderName fast paths.
  • Safe defaults: #![forbid(unsafe_code)], rustls TLS 1.3 (HttpTransportConfig::hardened_tls13()), zeroized SecretString credentials, SSE-C header redaction, and default SSRF/IMDS metadata IP blocking (169.254.169.254, 169.254.170.2, link-local IPv4).
  • Built-in resilience: exponential backoff with full jitter, Retry-After handling, automatic clock-skew correction, ExpiredToken refresh, bounded streaming pagination, windowed BatchExecutor, and non-blocking waiters.

Benchmarks (cortexa-rust-aws vs aws-sdk-rust)

Metric cortexa-rust-aws aws-sdk-rust
Client init 46.34 ms 118.07 ms
Peak OS RSS 18,820 KiB 41,876 KiB
Peak live heap 464,128 B 4,263,708 B
Total heap allocated 8.50 MB (17,586 allocs) 25.03 MB (95,807 allocs)

Feature Flags

  • default = ["s3", "dynamodb", "ec2"]
  • Services: acm, cloudformation, cloudwatch, dynamodb, ec2, ecr, ecs, eventbridge, iam, kms, lambda, logs, route53, s3, secretsmanager, sfn, sns, sqs, ssm, sts
  • Optional runtime: tracing, hickory-dns

Documentation & Links

License

Licensed under either of MIT or Apache-2.0, at your option.