Skip to content

🐛 Fix missing pagination in AWS DynamoDB, Config, ECS, Redshift, SageMaker#6920

Merged
tas50 merged 1 commit intomainfrom
tsmith/fix-aws-pagination
Mar 16, 2026
Merged

🐛 Fix missing pagination in AWS DynamoDB, Config, ECS, Redshift, SageMaker#6920
tas50 merged 1 commit intomainfrom
tsmith/fix-aws-pagination

Conversation

@tas50
Copy link
Copy Markdown
Member

@tas50 tas50 commented Mar 16, 2026

Summary

  • DynamoDB: Added pagination loops for ListTables (max 100/page), ListGlobalTables, and per-table ListBackups — all previously had "no pagination required" comments but actually do paginate
  • Config: Added NextToken pagination to DescribeConfigRules (max 25/page)
  • ECS: Added NextToken pagination to ListContainerInstances (max 100/page), collecting all ARNs before calling DescribeContainerInstances
  • Redshift: Added Marker pagination to DescribeClusterParameters
  • SageMaker: Added NextToken pagination to ListTags (max 50/page)

All of these were silently dropping results for accounts exceeding the default page size.

Test plan

  • go build ./providers/aws/... compiles cleanly
  • Verify DynamoDB tables listing on an account with >100 tables
  • Verify Config rules listing on an account with >25 rules
  • Verify ECS container instances listing on a cluster with >100 instances
  • Verify Redshift cluster parameters with large parameter groups
  • Verify SageMaker resource tags on resources with >50 tags

🤖 Generated with Claude Code

Copy link
Copy Markdown

@mondoo-code-review mondoo-code-review bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes incomplete data retrieval for AWS DynamoDB, Config, ECS, Redshift, and SageMaker resources that have more results than a single API page returns.

Comment thread providers/aws/resources/aws_dynamodb.go Outdated
Comment thread providers/aws/resources/aws_ecs.go
Several AWS API calls were missing pagination loops, causing silent data
loss for accounts exceeding the default page size:
- DynamoDB: ListTables (>100 tables), ListGlobalTables, ListBackups
- Config: DescribeConfigRules (>25 rules)
- ECS: ListContainerInstances (>100 instances)
- Redshift: DescribeClusterParameters
- SageMaker: ListTags (>50 tags)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tas50 tas50 force-pushed the tsmith/fix-aws-pagination branch from 59522e1 to 5dfb2d7 Compare March 16, 2026 05:00
@mondoo-code-review mondoo-code-review bot dismissed their stale review March 16, 2026 05:00

Superseded by new review

Copy link
Copy Markdown

@mondoo-code-review mondoo-code-review bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds missing pagination to several AWS API calls, preventing truncated results for large accounts.

@tas50 tas50 changed the title Fix missing pagination in AWS DynamoDB, Config, ECS, Redshift, SageMaker 🐛 Fix missing pagination in AWS DynamoDB, Config, ECS, Redshift, SageMaker Mar 16, 2026
@tas50 tas50 requested a review from vjeffrey March 16, 2026 05:01
@github-actions
Copy link
Copy Markdown
Contributor

Test Results

5 452 tests   5 448 ✅  1m 57s ⏱️
  412 suites      4 💤
   31 files        0 ❌

Results for commit 5dfb2d7.

@tas50 tas50 merged commit e34ac71 into main Mar 16, 2026
22 checks passed
@tas50 tas50 deleted the tsmith/fix-aws-pagination branch March 16, 2026 06:25
@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant