Server Fire Fighting Pro Tip 5: Tail Logs From The AWS CLI

Imagine the servers are down: what is the fastest way to get logs from your AWS infrastructure?
If you happen to already be logged in and have the tabs open then the console is great but wouldn’t it be great if you could just tail the logs directly from the cli?
Well I have good news: You can! AWS CLI offers a “Tail” command out of the box. You just need to know the Cloud Watch Group name then use the following syntax but replace {cw_group_name}
with the actual group name.
aws logs tail {cw_group_name}
Shout out to Jonathan Limbird from our last Cloud War Game Live event for pointing this one out.
Args:
--follow:
Seeing snap shots is great but if you are a real pro you will want to add --follow
command to see a continuous live stream of the logs as they are pumped into CW Logs.
--filter-pattern:
This allows you to add a Filter Pattern that filters out all the noise and lets you pin point only the most important information you need for firefighting.
Questions: What tools do you use to quickly dig through a flood of logs to dial in on the cause of an outage?