cortexa-rust-aws
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:
[]
= { = "0.1", = ["s3", "dynamodb", "sts"] }
= { = "1", = ["rt-multi-thread", "macros"] }
Create a client, check your caller identity, and manage an S3 bucket:
use *;
async
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 staticHeaderNamefast paths. - Safe defaults:
#![forbid(unsafe_code)],rustlsTLS 1.3 (HttpTransportConfig::hardened_tls13()), zeroizedSecretStringcredentials, 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-Afterhandling, automatic clock-skew correction,ExpiredTokenrefresh, bounded streaming pagination, windowedBatchExecutor, 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
- API reference: docs.rs/cortexa-rust-aws
- Repository: gitlab.com/cortexa/rust-crates/cortexa-rust-aws
License
Licensed under either of MIT or Apache-2.0, at your option.