Amazon CloudWatch Logs Live Tail
Live stream your CloudWatch log events as they are ingested into a particular Log Group with Amazon CloudWatch Logs Live Tail.
For detailed information about the Live Tail feature, see the Troubleshoot with CloudWatch Logs Live Tail topic in the Amazon CloudWatch Logs User Guide.
Live Tail sessions incur costs by session usage time, per minute. For information about pricing, view the Logs tab in the Paid Tier section of the Amazon CloudWatch Pricing
Starting a Live Tail session from the VS Code Command Palette
To start a Live Tail session from the VS Code Command Palette, complete the following steps.
For detailed information about Amazon CloudWatch Logs filters and patterns, see the Filter and pattern syntax section in the Amazon CloudWatch User Guide.
Starting a tailing session from the Command Palette
From VS Code, open the Command Palette by pressing
cmd+shift+p
(Windows:ctrl+shift+p
).From the Command Palette, enter the command
AWS: Tail Log Group
, then select it to open the Tail log group dialog in VS Code and follow the prompts to continue.Note
At the first prompt you have the option to switch your AWS Region before proceeding to the next steps.
From the Tail Log Group (1/3) prompt, choose the log group you want to tail.
From the Include log events from... (2/3) prompt, choose the log stream filter to apply to your tailing session.
From the Provide log event filter pattern... (3/3) prompt, enter your filter pattern in the provided field, then press the
Enter
key to continue or theESC
key to cancel the search.Upon completion, your results stream into the VS Code editor
Note
If a Live Tail session running in the VS Code window matches the configuration of a newly submitted Tail Log Group command, a new session doesn't start. Instead, your existing session becomes the active text editor.
Starting a Live Tail session from the AWS Explorer
To start a Live Tail session from the AWS Toolkit Explorer, complete the following steps.
Starting a tailing session from the AWS Explorer
From the AWS Toolkit Explorer, expand CloudWatch.
Open the context menu for (right-click) the Log Group you want to tail, then choose Tail Log Group to open the tailing prompt.
Follow the prompts to continue.
Your results will stream into the VS Code editor.
Stopping a Live Tail session
There are 2 ways to stop a running Tailing session.
Stopping a tailing session
Click the Stop tailing CodeLens at the bottom of the tailing-session text document.
Close all editors containing the tailing-session text document.