Jan. 22, 2024, 4:03 a.m. | Abhishek Gupta

DEV Community dev.to

Posted: 22/Jan/2024


The Query API returns the result set size to 1 MB. Use ExclusiveStartKey and LastEvaluatedKey elements to paginate over large result sets. You can also reduce page size by limiting the number of items in the result set, with the Limit parameter of the Query operation.


Here is an example:



func paginatedQuery(searchCriteria string, pageSize int32) {

currPage := 1
var exclusiveStartKey map[string]types.AttributeValue

for {
resp, _ := client.Query(context.Background(), &dynamodb.QueryInput{
TableName: aws.String(tableName),
KeyConditionExpression: aws.String("ForumName = :name"),
ExpressionAttributeValues: map[string]types.AttributeValue{
":name": …

api can cloud database dynamodb large limit page parameter query result serverless size

Social Engineer For Reverse Engineering Exploit Study

@ Independent study | Remote

Senior Software Engineer, Security

@ Niantic | Zürich, Switzerland

Consultant expert en sécurité des systèmes industriels (H/F)

@ Devoteam | Levallois-Perret, France

Cybersecurity Analyst

@ Bally's | Providence, Rhode Island, United States

Digital Trust Cyber Defense Executive

@ KPMG India | Gurgaon, Haryana, India

Program Manager - Cybersecurity Assessment Services

@ TestPros | Remote (and DMV), DC