Expand description
§ferrokinesis
A local AWS Kinesis Data Streams emulator written in Rust. Aims to exactly match real AWS Kinesis behavior, making it suitable for local development and integration testing without a live AWS account.
§Quick start
use ferrokinesis::{create_app, serve_plain_http, store::StoreOptions};
#[tokio::main]
async fn main() {
let (app, _store) = create_app(StoreOptions::default());
let listener = tokio::net::TcpListener::bind("127.0.0.1:4567").await.unwrap();
serve_plain_http(listener, app, async {
let _ = tokio::signal::ctrl_c().await;
})
.await
.unwrap();
}§Architecture
HTTP POST requests arrive at server::handler, which parses the X-Amz-Target
header to determine the actions::Operation, deserializes the JSON/CBOR body,
runs validation, then routes to the appropriate action handler in actions.
All persistent state lives in an in-memory concurrent store wrapped by
store::Store.
§AWS Kinesis documentation
See the Amazon Kinesis Data Streams API Reference for the full API specification.
Modules§
- actions
- Operation dispatch for the Kinesis emulator.
- capture
- Stream capture support and shared replay format helpers.
- config
- TOML configuration file loading for ferrokinesis.
- error
- Error types returned by the Kinesis emulator.
- health
- Health check endpoints for the Kinesis emulator.
- server
- Axum HTTP handler implementing the Kinesis wire protocol.
- store
- Concurrent in-memory store for streams, records, consumers, and policies.
- types
- Domain types mirroring the AWS Kinesis Data Streams data model.
Functions§
- create_
app - Creates an Axum
Routerand astore::Storeready to serve the Kinesis emulator. - create_
app_ with_ capture - Like
create_app, but accepts an optionalcapture::CaptureWriterto record PutRecord/PutRecords calls to an NDJSON file. - create_
router - Creates an Axum
Routeraround an existingstore::Store. - serve_
plain_ http - Serve an Axum app over a plain TCP listener with HTTP/1.1 and h2c auto-negotiation.