[Bug]: CloudWatch Logs Large Query Scenario - Offset Bug

Author: cpyle0819Created Apr 27, 2026Updated Apr 27, 2026

Expected behavior

Large query should not orphan any logs.

Actual behavior

This line https://github.com/awsdocs/aws-doc-sdk-examples/blob/ac9d32f046f9485149cf47a2348bd2c396e25fdd/javascriptv3/example_code/cloudwatch-logs/scenarios/large-query/cloud-watch-query.js#L77

bumps the ms by 1 for the next query. But, if the logs hit the 10k limit before exhausting all of the logs for that ms, those logs will be lost in the query.

Steps to reproduce

bash
Send 10,001 logs where log 10,000 and log 10,001 both share an identical timestamp. Maybe. Not sure if that will work but hopefully it explains the problem.

Logs / stacktrace (if applicable)

bash

Which SDK were you using?

.NET

Which OS were you using?

macOS

SDK version

No response

OS version

No response

Source: awsdocs/aws-doc-sdk-examples