Access and review your AWS CloudWatch logs directly from VSCode - faster, easier, and more convenient than the AWS console.
AWS CloudWatch extension brings powerful log viewing capabilities directly into Visual Studio Code, eliminating the need to switch between your IDE and the AWS console. View, search, and filter your CloudWatch logs with a streamlined interface designed for developers.
- π Multi-Region Support - Add log groups and streams from different AWS regions
- β‘ Lightning Fast - Loads logs faster than the AWS console
- π Advanced Filtering - Search, filter, hide, and date/time range filtering
- β Favorites - Mark frequently accessed logs for quick access
- π¦ Centralized View - Manage all your logs in one place
- π― Real-time Updates - Auto-refresh with configurable intervals
- πΎ Export Logs - Save logs to local files for offline analysis
- π¨ Syntax Highlighting - Color-coded error and exception messages
- π Text Wrapping - Toggle text wrapping for better readability
- β±οΈ Time-based Filtering - Filter logs by date and hour
- Installation
- AWS Credentials Setup
- Getting Started
- Features
- Usage
- Configuration
- Troubleshooting
- Roadmap
- Contributing
- Support
- License
- Open VSCode
- Press
Ctrl+P(Windows/Linux) orCmd+P(Mac) - Type:
ext install NecatiARSLAN.aws-cloudwatch-vscode-extension - Press Enter
# Clone the repository
git clone https://github.com/necatiarslan/aws-cloudwatch.git
# Install dependencies
cd aws-cloudwatch
npm install
# Compile the extension
npm run compile
# Package the extension
vsce packageThis extension requires AWS credentials to be configured on your system. You have several options:
# Install AWS CLI
# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
# Configure credentials
aws configureYou'll be prompted for:
- AWS Access Key ID: Your access key
- AWS Secret Access Key: Your secret key
- Default region name: e.g.,
us-east-1 - Default output format:
json
Create or edit ~/.aws/credentials:
[default]
aws_access_key_id = YOUR_ACCESS_KEY_ID
aws_secret_access_key = YOUR_SECRET_ACCESS_KEY
[profile-name]
aws_access_key_id = ANOTHER_ACCESS_KEY_ID
aws_secret_access_key = ANOTHER_SECRET_ACCESS_KEYCreate or edit ~/.aws/config:
[default]
region = us-east-1
[profile profile-name]
region = eu-west-1export AWS_ACCESS_KEY_ID="your-access-key-id"
export AWS_SECRET_ACCESS_KEY="your-secret-access-key"
export AWS_DEFAULT_REGION="us-east-1"Your AWS user/role needs the following permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:DescribeLogGroups",
"logs:DescribeLogStreams",
"logs:GetLogEvents"
],
"Resource": "*"
}
]
}-
Open the Extension
- Click the AWS CloudWatch icon in the Activity Bar (left sidebar)
-
Select AWS Profile (if you have multiple profiles)
- Click the account icon in the toolbar
- Select your AWS profile from the dropdown
-
Add a Log Group
- Click the folder icon (π) in the toolbar
- Enter the AWS region (e.g.,
us-east-1) - Select log group(s) from the list
-
Add Log Streams
- Right-click on a log group
- Select "Add Log Stream By Name" or "Add All Log Streams"
- For time-based: "Add Log Streams By Date"
-
View Logs
- Click on any log stream
- Click the preview icon (ποΈ) to open the log viewer
Manage log groups from multiple AWS regions in a single interface.
π us-east-1
βββ π /aws/lambda/my-function
βββ π 2024/01/15/[$LATEST]abc123
π eu-west-1
βββ π /aws/ecs/my-service
βββ π 2024/01/15/task-123
Search - Find specific text in logs
Search: "error" β highlights all instances
Filter - Show only matching logs
Filter: "status=200" β displays only matching entries
Hide - Exclude unwanted logs
Hide: "health-check" β hides all health check logs
Date/Time Filter - Filter by date and hour
βοΈ Date/Time Filter | From: [2024-01-15] Hour: [14 βΌ]
Shows logs from 2024-01-15 14:00 onwards
Toggle between wrapped and unwrapped text for better readability:
- βοΈ Wrapped - Long messages break across multiple lines
- β Unwrapped - Messages display on single line with horizontal scroll
- Auto-refresh with configured intervals
- Pause/Resume button to control updates
- Visual indicator when loading new logs
Save logs to local files:
- Click "Export Logs" button
- Logs saved to temporary file
- Automatically opened in new VSCode tab
Mark frequently accessed log groups/streams:
- Right-click β "Fav" to add to favorites
- Filter by favorites using the bookmark icon (π)
- Quick access to important logs
Automatically highlights:
- π΄ Errors and exceptions in red
- π‘ Search matches in yellow
- Clean, readable log display
| Icon | Action | Description |
|---|---|---|
| π | Show Only Favorite | Filter to show only favorited items |
| π | Filter | Apply global filter to log groups |
| π | Add Log Group (From List) | Browse and add log groups |
| π | Add Log Group (By Name) | Search and add specific log groups |
| π€ | Select AWS Profile | Switch between AWS profiles |
| π | Refresh | Reload the tree view |
Log Group:
- Add to Favorites / Remove from Favorites
- Remove Log Group
- Add Log Stream By Name
- Add All Log Streams
- Add Log Streams By Date
- Remove All Log Streams
Log Stream:
- Add to Favorites / Remove from Favorites
- Show Logs (opens viewer)
- Remove Log Stream
First Row:
- [Pause/Resume] - Control auto-refresh
- [Refresh] - Manually reload logs
- [Export Logs] - Save to file
- [Search] - Find text in logs
- [Filter] - Show only matching logs
- [Hide] - Exclude matching logs
- [βοΈ Wrap] - Toggle text wrapping
Second Row:
- [β Date/Time Filter] - Enable time-based filtering
- [Date Input] - Select start date
- [Hour Dropdown] - Select start hour (0-23)
Enterin Search/Filter/Hide fields - Apply filter without refresh
If you're behind a corporate proxy:
- Open VSCode Settings (
Ctrl+,orCmd+,) - Search for "proxy"
- Set
http.proxyto your proxy URL:http://proxy.company.com:8080
For LocalStack or custom AWS endpoints:
- Right-click in the tree view
- Select "Update Aws EndPoint"
- Enter your custom endpoint URL
- Leave empty to return to AWS default
Solution:
- Verify AWS credentials are configured:
cat ~/.aws/credentials - Check environment variables:
echo $AWS_ACCESS_KEY_ID
- Run
aws configureto reconfigure
Solution:
- Verify your IAM user/role has CloudWatch Logs permissions
- Check the Required IAM Permissions section
Solution:
- Check your internet connection
- Configure proxy settings if behind corporate firewall
- Verify AWS service endpoints are accessible
Solution:
- Check OUTPUT panel β "AWS CloudWatch-Log"
- Reload VSCode window (
Ctrl+RorCmd+R) - Reinstall the extension
Solution:
- Click Refresh button
- Verify log stream has recent logs
- Check date/time filter settings
- Review filter/hide/search settings
- Log Stream Filter Groups
- Log Stream Name Filter
- Enhanced log viewing for long messages
- JSON log formatting and navigation
- Custom log parsing rules
- Log analytics and statistics
- CloudWatch Insights integration
- Multi-log stream comparison
- Markdown export support
Have an idea? Open an issue with the enhancement label.
Contributions are welcome! Here's how you can help:
- Check existing issues
- Create a new issue
- Include:
- Extension version
- VSCode version
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Test thoroughly
- Commit:
git commit -m 'Add amazing feature' - Push:
git push origin feature/amazing-feature - Open a Pull Request
# Clone your fork
git clone https://github.com/YOUR-USERNAME/aws-cloudwatch.git
# Install dependencies
npm install
# Run in development mode
# Press F5 in VSCode to launch Extension Development Host
# Compile
npm run compile
# Run tests
npm test
# Lint code
npm run lint- π Documentation
- π Report Bug
- π‘ Request Feature
- π¬ Discussions
If you find this extension helpful:
- β Star the repository
- βοΈ Leave a review
- β Sponsor on GitHub
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Copyright 2024 Necati ARSLAN
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Special thanks to all contributors who have helped improve this extension.
Built with β€οΈ by Necati ARSLAN
Necati ARSLAN
- π§ Email: necatia@gmail.com
- πΌ LinkedIn: necati-arslan
- π GitHub: @necatiarslan
Made with β€οΈ for AWS developers
