Page MenuHomePhabricator

[terraform] Create table for devices
ClosedPublic

Authored by bartek on Dec 4 2023, 6:42 AM.
Tags
None
Referenced Files
F3399966: D10153.id34183.diff
Mon, Dec 2, 5:36 AM
F3399919: D10153.diff
Mon, Dec 2, 5:18 AM
F3399590: D10153.id34524.diff
Mon, Dec 2, 3:55 AM
Unknown Object (File)
Tue, Nov 26, 6:04 AM
Unknown Object (File)
Mon, Nov 18, 11:28 PM
Unknown Object (File)
Thu, Nov 7, 12:52 AM
Unknown Object (File)
Oct 18 2024, 5:37 AM
Unknown Object (File)
Oct 18 2024, 5:37 AM
Subscribers

Details

Summary

ENG-5116.
Created a table for devices and device lists as designed in the linked Linear task.

Also added a separate LSI (local secondary index) for device list timestamps, which improves performance of very frequent query: "Get all user's device list updates since given timestamp".

The itemID column is either device-${deviceID} or devicelist-${datetime}. The timestamp is a separate column present only for device-list items. It contains duplicated timestamp only for the sake of aforementioned LSI.

Test Plan

Initialized localstack and used aws-cli to ensure the table is created as expected.

awslocal dynamodb list-tables
awslocal dynamodb describe-table --table-name identity-devices

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage