cortexa-rust-aws
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-rustin 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()).
- Fluent resource builders (
- 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, zeroRwLockorUrl::clone()on hot paths). - Stack-allocated relative path normalization (
[u8; 256]) inREST-XML/REST-JSONcodecs. - Static
HeaderName::from_staticfast paths in thereqwesttransport.
- Lock-free
- Security by Default:
- SSRF / IMDS Guard (
block_metadata_ips = trueby 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 allowing127.0.0.1/localhostfor local emulators. - Hardened TLS 1.3 profile (
HttpTransportConfig::hardened_tls13()). - Pure-Rust SigV4 signing with
SigningKeycaching, end-to-endx-amz-checksum-sha256,SecretStringzeroized onDrop, and SSE-C sensitive header redaction.
- SSRF / IMDS Guard (
- Centralized Resilience:
- Exponential backoff + Full Jitter +
Retry-After, automatic clock-skew correction (AtomicI64), automaticExpiredTokenrefresh, bounded streaming pagination (collect_bounded()), windowedBatchExecutor, and non-blockingWaitCondition/BackgroundWaiter.
- Exponential backoff + Full Jitter +
Quick Start
Add cortexa-rust-aws to your Cargo.toml:
[]
= { = "0.1", = ["s3", "dynamodb", "sts"] }
= { = "1", = ["rt-multi-thread", "macros"] }
use *;
async
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
- API Documentation: docs.rs/cortexa-rust-aws
- Naming & API References: naming-conventions.md · aws-api-references.md
- Contributing: CONTRIBUTING.md
License
Dual-licensed under either of:
at your option.