Code Monkey home page Code Monkey logo

aws-dynamodb-stream-eventbridge-fanout's Introduction

AWS DynamoDB Stream EventBridge Fanout Build Status

This repository contains a serverless app that forwards events from a DynamoDB stream to an Amazon EventBridge event bus.

The high-level architecture is as follows:

Architecture Diagram

A common pattern within cloud architectures is to trigger consumers based on changes to data, and this app helps to facilitate this pattern when using AWS services.

DynamoDB streams capture changes to items in a DynamoDB table, and can be used to trigger AWS Lambda functions or other consumers. However, there is a limit of two consumers per DynamoDB stream. This app attaches a single Lambda function to a source DynamoDB stream, which captures the stream events and publishes them to an Amazon EventBridge event bus, which can support up to 100 consumers.

If the fanout Lambda function is unable to publish an event to the event bus after the configured number of retries, it will send the message to an SQS dead letter queue so the particular failure can be investigated.

Installation Steps

This app is published as a serverless application in the AWS Serverless Application Repository. You can install it using the following steps:

  1. Create an AWS account if you do not already have one and login
  2. Go to this app's page on the Serverless Application Repository
  3. Provide the required parameters and click "Deploy"

Parameters

This app has the following parameters:

  1. DynamoDBStreamArn (required) - The ARN of the source DynamoDB stream
  2. EventBusName (optional) - The name of the event bus to create. Default: default
  3. EventBridgeMaxAttempt (optional) - The max attempts to try to put events into the event bus, after which the event will be sent to the dead letter queue. Default: 1

Outputs

The CloudFormation stack that this app deploys has the following outputs:

  1. FanoutLambdaName - The name of the created fanout Lambda function
  2. FanoutDlqUrl - The URL of the created dead letter SQS queue

License

This project is licensed under the Apache-2.0 License.

aws-dynamodb-stream-eventbridge-fanout's People

Contributors

amazon-auto avatar carvantes avatar dependabot[bot] avatar honglu avatar mlaff avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.