reqsign-aws-v4
AWS SigV4 signing implementation for reqsign.
This crate provides AWS Signature Version 4 (SigV4) signing capabilities for authenticating requests to AWS services like S3, DynamoDB, Lambda, and more.
Quick Start
use ;
use ;
// Create context and signer
let ctx = default;
let config = default.from_env.from_profile;
let loader = new;
let builder = new;
let signer = new;
// Sign requests
let mut req = get
.body
.unwrap
.into_parts
.0;
signer.sign.await?;
Features
- Complete SigV4 Implementation: Full AWS Signature Version 4 support
- Multiple Credential Sources: Environment, files, IAM roles, and more
- Service Agnostic: Works with any AWS service using SigV4
- Async Support: Built for modern async Rust applications
Credential Sources
This crate supports loading credentials from:
-
Environment Variables
# Optional -
Credential File (
~/.aws/credentials)[default] aws_access_key_id = your_access_key aws_secret_access_key = your_secret_key [production] aws_access_key_id = prod_access_key aws_secret_access_key = prod_secret_key -
IAM Roles (EC2, ECS, Lambda)
- Automatically detected and used when running on AWS infrastructure
-
AssumeRole with STS
let config = default .role_arn .role_session_name; -
Web Identity Tokens (EKS/Kubernetes)
- Automatically detected in EKS environments
Supported Services
Works with any AWS service using SigV4:
- Storage: S3, EBS, EFS
- Database: DynamoDB, RDS, DocumentDB
- Compute: EC2, Lambda, ECS
- Messaging: SQS, SNS, EventBridge
- Analytics: Kinesis, Athena, EMR
- And many more...
Examples
S3 Operations
// List buckets
let req = get
.header
.body?;
// Get object
let req = get
.header
.body?;
DynamoDB Operations
// List tables
let req = post
.header
.header
.body?;
Check out more examples:
Advanced Configuration
Custom Profile
let config = default
.profile
.from_profile;
Assume Role
let config = default
.role_arn
.external_id
.duration_seconds;
Direct Credentials
let config = default
.access_key_id
.secret_access_key
.session_token;
License
Licensed under Apache License, Version 2.0.