Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DynamoDB Streams to use EventBridge Pipe for better filtering #11

Open
san99tiago opened this issue Jul 8, 2024 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@san99tiago
Copy link
Owner

Current workflow of the solution is implemented with:

  • Lambda --> DynamoDB --> DynamoDB Streams --> Lambda --> State Machine (Lambas)

In a near future, the workflow will also save the "response" messages by the chatbot in the same DynamoDB Table, making the workflow to look something like this:

  • Lambda --> DynamoDB --> DynamoDB Streams --> Lambda --> State Machine (Lambas) --> DynamoDB --> DynamoDB Streams (NOT INTENDED)!!!!

So when the "answered messages" are added to the DynamoDB Table (kept with Single Table Design), it's important to avoid enabling the streams to be sent to the State Machine (as these are not user's messages, only the chat history...).

The proposed solution is to update the workflow to be:

  • Lambda --> DynamoDB --> DynamoDB Streams --> EventBridge Pipe --> Lambda --> State Machine (Lambas)

With the correct EventBridge Pipe filter, the infinite loop can be avoided for the "answered responses" because of filtering the PK/SK.

@san99tiago san99tiago added the enhancement New feature or request label Jul 8, 2024
@san99tiago san99tiago self-assigned this Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant