Current lambda code checks the old DynamoDB table (Database using PK and SK) to see if a user has already registered. This adds a dependency on the old table for our registration workflow in the log_visit.py file. We can get rid of this read dependency to potentially remove dual-writing system in the future.
Solution:
In log_visit.py, changed the isUserRegistered function. The query now checks the username column of new "users" table. Previously, the original "old" table's "PK" column was queried. This change checks if the users table has the requested username of the visit.
Testing:
Logs in Dev environment lambda visit function showed that this change was
checking the new users table. Tables updated correctly for completely new
usernames and existing usernames, so no functional difference.
for checking if user was registered.
Problem:
Current lambda code checks the old DynamoDB table (Database using PK and SK) to see if a user has already registered. This adds a dependency on the old table for our registration workflow in the log_visit.py file. We can get rid of this read dependency to potentially remove dual-writing system in the future.
Solution:
In log_visit.py, changed the isUserRegistered function. The query now checks the username column of new "users" table. Previously, the original "old" table's "PK" column was queried. This change checks if the users table has the requested username of the visit.
Testing:
Logs in Dev environment lambda visit function showed that this change was checking the new users table. Tables updated correctly for completely new usernames and existing usernames, so no functional difference.
Issue:
N/A, no open GitHub Issue.