Skip to content

reader for dynamodb streams to simplify local testing

Notifications You must be signed in to change notification settings

savaki/ddbstream

Repository files navigation

ddbstream

Simplifies the development of Go lambda functions that consume directly from dynamodb streams.

Use Case

ddbstream allows once to subscribe to a dynamodb stream by passing a function that should be invoked each time a new event (or set of events) is received.

Example

s := session.Must(session.NewSession(aws.NewConfig()))
tableName := "blah"
stream := New(dynamodb.New(s), dynamodbstreams.New(s), tableName)

ctx := context.Background()
fn := func(ctx context.Context, data json.RawMessage) error {
    // do work here
    return nil
}
sub, _ := stream.Subscribe(ctx, fn)
defer sub.Close()

Notes

  • Not suitable for production use
  • Only supports reading from LATEST

About

reader for dynamodb streams to simplify local testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages