List a customer's orders and retrieve order details by order ID.
Make reads key-based and avoid repeated table scans.
Which design is most appropriate?
Design PK and SK from the access patterns and add only the GSI needed for an additional query path.
Detailed explanation
TTL is an expiry timestamp, not a customer lookup key.
TTL is an expiry timestamp, not a customer lookup key.
The key design lets Query retrieve a customer's orders and related items without a full Scan.
The key design lets Query retrieve a customer's orders and related items without a full Scan.
Reading the entire table makes cost and latency grow with item count.
Reading the entire table makes cost and latency grow with item count.
Large items increase update conflicts, size-limit risk, and difficulty of partial reads.
Large items increase update conflicts, size-limit risk, and difficulty of partial reads.
Check official documentation
Compare the following points with the official documentation.
Amazon DynamoDB single-table design、Query、Scan、GSIの公式説明を確認する。
What to confirm
Query中心のキー設計とScan依存の違いを説明できる。
Key points
- Access pattern
- PK/SK
- GSI
- Query
Notes
- Environment: AWS公式DEA-C01試験ガイドと各サービスの公式ドキュメントの確認
- Confirm current AWS service behavior in the official DEA-C01 documentation.
Foundation review
Controlled denormalization
Duplicating selected attributes can make reads efficient when updates remain manageable.
Query over Scan
A key-based Query avoids reading unrelated items and scales with the targeted partition.