lucagrulla / cw

The best way to tail AWS CloudWatch Logs from your terminal
https://www.lucagrulla.com/cw
Apache License 2.0
792 stars 59 forks source link

Can't tail an existing log group #220

Closed vandr0iy closed 1 year ago

vandr0iy commented 3 years ago

Describe the bug Can't tail an existing log group - which I used to be able to tail just about the day before with the same identical command/user (which is an administrator in its AWS account).

To Reproduce

λ cw --version                                                                                                                                                                                                                                                                                ~
4.1.0

λ cw --profile=my-prod-profile tail 'bellboy/prod' > tee /tmp/logs                                                                                                                                                                                                                  ~
operation error CloudWatch Logs: FilterLogEvents, https response error StatusCode: 400, RequestID: fbdf9175-fe89-4158-822b-5fb5afa61b25, ResourceNotFoundException: The specified log group does not exist.

λ cw --profile=my-prod-profile ls groups | grep bellboy                                                                                                                                                                                                                             ~
/aws/lambda/bellboyProdMonkey
/aws/lambda/bellboyProdPipelineMonitoring
/bellboy/preprod
/builder/bellboy
/qa/bellboy
bellboy/prod

Expected behavior A huge wall of text containing my logs :)

Desktop (please complete the following information):

vandr0iy@finwe
--------------
OS: NixOS 21.11 (Porcupine) x86_64
Kernel: 5.14.10
Uptime: 2 hours, 5 mins
Packages: 623 (nix-system), 2966 (nix-user)
Shell: zsh 5.8
Resolution: 2560x1440
DE: none+bspwm
WM: bspwm
Theme: SolArc-Dark [GTK2/3]
Icons: Paper [GTK2/3]
Terminal: xst
CPU: AMD Ryzen 7 3700X (16) @ 3.600GHz
GPU: NVIDIA GeForce GT 710
GPU: NVIDIA GeForce GTX 1080 Ti
Memory: 14006MiB / 32040MiB

Tested on bash as well, with no luck

If it's not a bug - given that it might not be easily reproducible on other machines/AWS accounts - where may I even start to look to troubleshoot this?

vandr0iy commented 3 years ago

Ah, just FYI - while I was searching for alternatives while cw is not working for me, I stumbled on this. Quick usage example:

aws logs tail 'bellboy/prod' --format short --since '2021-10-26T22:57:00'

It's way more spartan than cw (doesn't even have the until complementary option for since) - but at least I was able to pipe some logs in a text file and slice&dice them with vim, so there's that.

lucagrulla commented 3 years ago

Hi @vandr0iy This is odd. Was the stream name exactly the same the other day?

vandr0iy commented 3 years ago

Yes, I picked it up from the history

vandr0iy commented 3 years ago

tried also with other streams in the same AWS account, but with no luck. Works with other AWS accounts too, though. Could it be an AWS authorization issue, somehow?

lucagrulla commented 3 years ago

It could be! It's unclear why ls works but not tail, but it's worth checking if any permission/auth has changed for that AWS account.

lucagrulla commented 1 year ago

Closing.