Orders are stored with orderId as the primary key, but users must search by customer ID and order date.
Avoid a table-wide Scan and support the new access path with an index.
Which data-store design is most appropriate?
Create a Global Secondary Index with customer ID and order date as its key attributes.
Detailed explanation
This is useful for analysis but does not provide low-latency online search.
This is useful for analysis but does not provide low-latency online search.
An IAM policy controls permissions and does not create a DynamoDB index.
An IAM policy controls permissions and does not create a DynamoDB index.
A GSI supports Query with partition and sort keys different from the base table.
A GSI supports Query with partition and sort keys different from the base table.
A Scan reads the table before filtering, so cost and latency grow with table size.
A Scan reads the table before filtering, so cost and latency grow with table size.
Check official documentation
Compare the following points with the official documentation.
DynamoDB GSI、Query、Projection、整合性と容量の公式説明を確認する。
What to confirm
GSIと全件Scan、分析用エクスポート、IAM権限の違いを説明できる。
Key points
- GSI
- Query
- Projection
- Capacity
Notes
- Environment: AWS公式DEA-C01試験ガイドと各サービスの公式ドキュメントの確認
- Confirm current AWS service behavior in the official DEA-C01 documentation.
Foundation review
Index trade-off
GSI storage and write capacity must be balanced against the new read pattern.
Consistency choice
GSI reads are eventually consistent, so freshness requirements must be checked.