Page MenuHomePhabricator

[terraform] Create table for devices
ClosedPublic

Authored by bartek on Dec 4 2023, 6:42 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 23, 10:29 AM
Unknown Object (File)
Mon, Dec 23, 10:29 AM
Unknown Object (File)
Mon, Dec 23, 10:29 AM
Unknown Object (File)
Mon, Dec 23, 10:29 AM
Unknown Object (File)
Dec 3 2024, 1:47 AM
Unknown Object (File)
Dec 2 2024, 5:36 AM
Unknown Object (File)
Dec 2 2024, 5:18 AM
Unknown Object (File)
Dec 2 2024, 3:55 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
Lint Not Applicable
Unit
Tests Not Applicable