Stateful AWS service mocking for aws-sdk-rust. Intercepts SDK HTTP calls in-process and routes them to in-memory service backends that simulate real AWS behavior with persistent state. No network I/O required.
Inspired by Python's moto.
| Service | Crate | Protocol |
|---|---|---|
| ACM | winterbaume-acm |
awsJson1.1 |
| CloudFront | winterbaume-cloudfront |
REST-XML |
| CloudWatch | winterbaume-cloudwatch |
awsQuery |
| CloudWatch Logs | winterbaume-logs |
awsJson1.1 |
| Cognito Identity Provider | winterbaume-cognitoidp |
awsJson1.1 |
| DynamoDB | winterbaume-dynamodb |
awsJson1.0 |
| ECR | winterbaume-ecr |
awsJson1.1 |
| ECS | winterbaume-ecs |
awsJson1.1 |
| EKS | winterbaume-eks |
REST-JSON |
| ELBv2 | winterbaume-elbv2 |
awsQuery |
| EventBridge | winterbaume-events |
awsJson1.1 |
| Firehose | winterbaume-firehose |
awsJson1.1 |
| IAM | winterbaume-iam |
awsQuery |
| Kinesis | winterbaume-kinesis |
awsJson1.1 |
| KMS | winterbaume-kms |
awsJson1.1 |
| Lambda | winterbaume-lambda |
REST-JSON |
| Organizations | winterbaume-organizations |
awsJson1.1 |
| Route 53 | winterbaume-route53 |
REST-XML |
| S3 | winterbaume-s3 |
REST-XML |
| Secrets Manager | winterbaume-secretsmanager |
awsJson1.1 |
| SES v2 | winterbaume-ses |
REST-JSON |
| SNS | winterbaume-sns |
awsQuery |
| SQS | winterbaume-sqs |
awsJson1.0 |
| SSM | winterbaume-ssm |
awsJson1.1 |
| Step Functions | winterbaume-stepfunctions |
awsJson1.0 |
| STS | winterbaume-sts |
awsQuery |
use winterbaume_core::MockAws;
use winterbaume_sts::StsService;
use winterbaume_iam::IamService;
use winterbaume_s3::S3Service;
let mock = MockAws::builder()
.with_service(StsService::new())
.with_service(IamService::new())
.with_service(S3Service::new())
.build();
let config = aws_config::defaults(BehaviorVersion::latest())
.http_client(mock.http_client())
.credentials_provider(mock.credentials_provider())
.region("us-east-1")
.load()
.await;
let sts = aws_sdk_sts::Client::new(&config);
let resp = sts.get_caller_identity().send().await.unwrap();
assert_eq!(resp.account(), Some("123456789012"));For non-Rust clients, winterbaume-server provides a standalone HTTP server:
cargo run -p winterbaume-server -- --host 127.0.0.1 --port 5555Point the AWS SDK at it:
export AWS_ENDPOINT_URL=http://localhost:5555
aws s3 mb s3://my-bucketwinterbaume-core-- shared infrastructure:MockAwsbuilder,MockServicetrait, per-account/region state management, HTTP client/connector bridge.winterbaume-{service}-- each service crate implementsMockServicewith its own protocol handling and in-memory state.winterbaume-server-- hyper-based HTTP server that registers all service backends.
State is partitioned per account ID and region, matching real AWS isolation semantics.
Apache-2.0. See LICENSE for the full text.
This project vendors moto (Copyright 2012 Steve Pulec, Apache-2.0) as a reference implementation under vendor/moto/. See NOTICE for third-party attribution details.