Only orders in an unprocessed state must be listed.
Keep GSI storage and write overhead limited to the items that need this access path.
Which design is most appropriate?
Set the GSI key attributes only on qualifying items, creating a sparse index that can be queried without copying every item.
Detailed explanation
Unneeded items are indexed, increasing storage and write cost.
Unneeded items are indexed, increasing storage and write cost.
Items without those attributes are absent from the GSI, so the index contains only the target set.
Items without those attributes are absent from the GSI, so the index contains only the target set.
S3 object lifecycle rules cannot query DynamoDB items.
S3 object lifecycle rules cannot query DynamoDB items.
Filtering after a Scan does not reduce the amount of data read and scales poorly.
Filtering after a Scan does not reduce the amount of data read and scales poorly.
Check official documentation
Compare the following points with the official documentation.
Amazon DynamoDB sparse index、GSI key attribute、Queryの公式説明を確認する。
What to confirm
sparse GSIが全項目を複製せず条件対象だけを検索する仕組みを説明できる。
Key points
- Sparse GSI
- GSI
- FilterExpression
- Write cost
Notes
- Environment: AWS公式DEA-C01試験ガイドと各サービスの公式ドキュメントの確認
- Confirm current AWS service behavior in the official DEA-C01 documentation.
Foundation review
Selective indexing
Index only the state or entity needed by the query and project the required attributes.
Consistency
A GSI may be eventually consistent, so critical reads need an appropriate source and policy.