Consider a DynamoDB table named Books with 10 items. You run this scan command with Limit=3:
aws dynamodb scan --table-name Books --limit 3
What will be the number of items returned in Items?
The Limit parameter controls how many items are returned in one response.
The Limit=3 means the scan will return at most 3 items in the response, even if the table has more items.
You perform a scan on a DynamoDB table with Limit=2. The response includes LastEvaluatedKey. What does this key represent?
Think about how you get the next page of results in DynamoDB.
LastEvaluatedKey is used as the ExclusiveStartKey in the next scan to continue from where the last scan stopped.
You have the LastEvaluatedKey from a previous scan stored in a JSON file lastkey.json. Which command correctly uses it to get the next 5 items?
Check the exact parameter name for starting a scan from a key.
The correct parameter is --exclusive-start-key to specify where to continue scanning.
You set Limit=5 in a scan, but the response returns fewer than 5 items without LastEvaluatedKey. Why?
Think about what happens when you reach the last items in the table.
If fewer than the Limit number of items remain, the scan returns only those items and no LastEvaluatedKey.
You want to paginate through a large DynamoDB table efficiently. Which approach is best?
Consider how DynamoDB is optimized for queries on keys.
Query with a partition key is efficient and supports pagination with ExclusiveStartKey. Scan reads the whole table and is slower.