Filtering CloudWatch logs for a long time window

Recently I needed to filter cloud watch logs for a keyword, since the time window was too long and it was container based app, there were too many log streams to filter on. So not a task that can be done manually using console.

AWS cli came handy and below did the magic ..

aws logs filter-log-events --log-group-name production/ecs-service --log-stream-name-prefix my-service-prod --filter-pattern user111  --start-time 1561997947000 --end-time 1574698747000 --output text >> user1.txt


Time filter is given in milliseconds since 1970 .. This web site was handy to come up for those



Comments

Popular posts from this blog

Launching an LOV by clicking a link or button 11g

Retrieve BPM composite version from ADF