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

Rewrite Total Occurrence Lambda Stream Adapter #526

Open
ashley-evans opened this issue Dec 18, 2022 · 0 comments
Open

Rewrite Total Occurrence Lambda Stream Adapter #526

ashley-evans opened this issue Dec 18, 2022 · 0 comments
Labels

Comments

@ashley-evans
Copy link
Owner

Value Added

Reduces complexity, improves readability - Enables future changes to be made more easily

Description

Currently the DynamoDB stream adapter for the Total Occurrence lambda has logic to determine whether an item is an occurrence or a total. This duplicates checks that occur in the Domain and ultimately makes the adapter much harder to test and read.

Updating the adapter to simply just map the DynamoDB stream record to a flat TS type that is provided to the domain would improve the readability of this lambda's code dramatically.

Acceptance Criteria

AC01

  • Update the DynamoDB stream adapter for the total occurrence lambda to only map from stream event to a TS type
  • Both total and occurrence items should map to the same type
  • The domain should then differentiate between the two, rather than the adapter performing this task

AC02

  • The behavior of the lambda should otherwise be unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant