glassechidna / gossm

Cross-platform CLI tool to make remote command execution in AWS a breeze
Apache License 2.0
12 stars 2 forks source link

Improve CW Logs pagination #2

Open aidansteele opened 5 years ago

aidansteele commented 5 years ago

Right now we have the following code:

https://github.com/glassechidna/gossm/blob/d236fcd4e9de63554d79919979e7e5eb66da31e0/pkg/gossm/client.go#L234-L241

This will paginate from the most recent timestamp for the instance that least recently posted to CW Logs. We need to do it this way to avoid missing logs from laggards, but it means keeping a cache of "seen" messages to avoid printing duplicates.

This is suboptimal because:

aidansteele commented 5 years ago

We should also (configurably) support trailing back a few seconds automatically if nothing is being ignored