The existing table is queried by customer ID.
Add a query for unprocessed orders by status and update time without breaking current reads.
Which design is most appropriate?
Add a GSI for the new access pattern and plan projection, backfill capacity, and a staged application migration.
Detailed explanation
A DynamoDB table's primary key cannot be changed in place.
A DynamoDB table's primary key cannot be changed in place.
TTL expires items and does not provide an arbitrary status index.
TTL expires items and does not provide an arbitrary status index.
Filtering after a Scan does not avoid reading the table and scales poorly.
Filtering after a Scan does not avoid reading the table and scales poorly.
A GSI adds a Query path without changing the immutable base-table primary key.
A GSI adds a Query path without changing the immutable base-table primary key.
Check official documentation
Compare the following points with the official documentation.
Amazon DynamoDB global secondary indexes、online index creation、projectionの公式説明を確認する。
What to confirm
GSIが主キー変更ではなく追加の検索経路であることを説明できる。
Key points
- GSI
- Projection
- Backfill
- Schema evolution
Notes
- Environment: AWS公式DEA-C01試験ガイドと各サービスの公式ドキュメントの確認
- Confirm current AWS service behavior in the official DEA-C01 documentation.
Foundation review
Staged migration
Deploy an index, validate it, and move readers gradually while monitoring capacity.
Filter versus key
A FilterExpression removes results after a read; a GSI makes the access key addressable.