Dev Blog #1: Introducing DynamoDbLite #30
marklauter
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What is DynamoDbLite?
DynamoDbLite is an in-process implementation of the AWS
IAmazonDynamoDBinterface backed by SQLite. It provides a drop-in replacement for the real DynamoDB client — no AWS credentials, no internet, no provisioned capacity charges. Just add the NuGet package and point your DI container at it.The goal is simple: make local development and testing with DynamoDB fast, free, and frictionless.
Why not DynamoDB Local?
AWS provides DynamoDB Local, a Java-based emulator that runs as a separate process. It works, but it has drawbacks:
DynamoDbLite runs in-process. It's a C# library — instantiate it and go. In-memory mode is perfect for tests; file-based mode (with SQLite WAL) works for persistent local development or even embedded in mobile apps.
What's been built so far
The project has progressed through 11 development phases, each adding a layer of DynamoDB functionality:
CreateTable,DeleteTable,DescribeTable,ListTablesPutItem,GetItem,DeleteItem,UpdateItemwith full expression support (ConditionExpression,ProjectionExpression,UpdateExpression) and allReturnValuesmodesQueryandScanwithKeyConditionExpression,FilterExpression, pagination, andScanIndexForwardBatchGetItem(100-item limit) andBatchWriteItem(25-op limit) with multi-table supportUpdateTablefor GSI create/delete with backfillTransactWriteItemsandTransactGetItemswith all-or-nothing semantics, idempotency tokens, andReturnValuesOnConditionCheckFailureTagResource,UntagResource,ListTagsOfResourceDescribeEndpointsandDescribeLimitsInMemorySqliteStoreandFileSqliteStorewith proper concurrency handlingThe test suite currently has 501 tests covering both storage backends.
How it works under the hood
The architecture maps DynamoDB concepts onto SQLite:
itemsSQLite table with columns for partition key, sort key, TTL epoch, and a JSON blob for the full itemidx_{tableName}_{indexName})ConditionExpression,FilterExpression,UpdateExpression,ProjectionExpression,KeyConditionExpression) are parsed using Superpower parser combinators into an AST, then evaluated in C#IAmazonDynamoDBinterface is implemented as a partial class split by feature areaTech stack
What's next
There's still ground to cover — Streams, Global Tables, and some edge cases in expression evaluation are tracked as tech debt. The focus is on covering the operations that matter most for local dev and testing scenarios.
If you're working with DynamoDB in .NET and want a lighter alternative to DynamoDB Local, give it a try. Issues and feedback are welcome.
This is the first entry in the DynamoDbLite dev blog. Future posts will cover implementation details, design decisions, and new features as they land.
All reactions