Amazon DynamoDB · Arazzo Workflow

Amazon DynamoDB Scan With Pagination

Version 1.0.0

Scan a table and page through results until the table is exhausted.

1 workflow 1 source API 1 provider
View Spec View on GitHub DatabaseDocument StoreKey-ValueNoSQLServerlessArazzoWorkflows

Provider

amazon-dynamodb

Workflows

scan-paginate
Scan a table and follow LastEvaluatedKey until the scan is complete.
Runs an initial Scan, then branches: while a LastEvaluatedKey is returned it continues the scan from that key, and when none is returned it ends.
2 steps inputs: expressionAttributeNames, expressionAttributeValues, filterExpression, limit, tableName outputs: lastPageItems
1
scanFirstPage
Run the initial scan over the table.
2
scanNextPage
Continue the scan from the previous page's LastEvaluatedKey, looping until DynamoDB returns no further LastEvaluatedKey.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Amazon DynamoDB Scan With Pagination
  summary: Scan a table and page through results until the table is exhausted.
  description: >-
    Reads every matching item from a table by issuing an initial Scan and
    then repeatedly continuing the scan from the returned LastEvaluatedKey
    until DynamoDB stops returning one, signalling the end of the table.
    This is the canonical full-table-scan pagination loop. Every step
    spells out its request inline, including the AWS JSON protocol
    X-Amz-Target header, so the flow can be read and executed without
    opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: queriesApi
  url: ../openapi/amazon-dynamodb-queries-api-openapi.yml
  type: openapi
workflows:
- workflowId: scan-paginate
  summary: Scan a table and follow LastEvaluatedKey until the scan is complete.
  description: >-
    Runs an initial Scan, then branches: while a LastEvaluatedKey is
    returned it continues the scan from that key, and when none is returned
    it ends.
  inputs:
    type: object
    required:
    - tableName
    properties:
      tableName:
        type: string
        description: The name of the table to scan.
      filterExpression:
        type: string
        description: Optional filter expression to apply to scanned items.
      expressionAttributeNames:
        type: object
        description: Optional substitution tokens for attribute names.
      expressionAttributeValues:
        type: object
        description: Optional values substituted into the filter expression.
      limit:
        type: integer
        description: Maximum number of items to evaluate per page.
  steps:
  - stepId: scanFirstPage
    description: Run the initial scan over the table.
    operationId: scan
    parameters:
    - name: X-Amz-Target
      in: header
      value: DynamoDB_20120810.Scan
    requestBody:
      contentType: application/x-amz-json-1.0
      payload:
        TableName: $inputs.tableName
        FilterExpression: $inputs.filterExpression
        ExpressionAttributeNames: $inputs.expressionAttributeNames
        ExpressionAttributeValues: $inputs.expressionAttributeValues
        Limit: $inputs.limit
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      items: $response.body#/Items
      lastEvaluatedKey: $response.body#/LastEvaluatedKey
    onSuccess:
    - name: morePages
      type: goto
      stepId: scanNextPage
      criteria:
      - context: $response.body
        condition: $.LastEvaluatedKey != null
        type: jsonpath
    - name: scanComplete
      type: end
      criteria:
      - context: $response.body
        condition: $.LastEvaluatedKey == null
        type: jsonpath
  - stepId: scanNextPage
    description: >-
      Continue the scan from the previous page's LastEvaluatedKey, looping
      until DynamoDB returns no further LastEvaluatedKey.
    operationId: scan
    parameters:
    - name: X-Amz-Target
      in: header
      value: DynamoDB_20120810.Scan
    requestBody:
      contentType: application/x-amz-json-1.0
      payload:
        TableName: $inputs.tableName
        FilterExpression: $inputs.filterExpression
        ExpressionAttributeNames: $inputs.expressionAttributeNames
        ExpressionAttributeValues: $inputs.expressionAttributeValues
        Limit: $inputs.limit
        ExclusiveStartKey: $steps.scanFirstPage.outputs.lastEvaluatedKey
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      items: $response.body#/Items
      lastEvaluatedKey: $response.body#/LastEvaluatedKey
    onSuccess:
    - name: stillMorePages
      type: goto
      stepId: scanNextPage
      criteria:
      - context: $response.body
        condition: $.LastEvaluatedKey != null
        type: jsonpath
    - name: done
      type: end
      criteria:
      - context: $response.body
        condition: $.LastEvaluatedKey == null
        type: jsonpath
  outputs:
    lastPageItems: $steps.scanNextPage.outputs.items

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/amazon-dynamodb-scan-paginate-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.