Introduction
Managing EC2 instances across multiple AWS regions can be a challenging task. As your cloud infrastructure grows, switching between regions in the AWS Console becomes time-consuming and inefficient.
Today, I'm excited to introduce the AWS EC2 Instance Manager - a lightweight, browser-based tool I've developed to solve this exact problem.
π Try the app here:
https://gray-plant-037bead10.6.azurestaticapps.net/
π GitHub Repo:
https://github.com/yeshwanthlm/AWS-EC2-Instance-Manager
The Challenge of Multi-Region Management
If you're managing AWS infrastructure, you've likely encountered these pain points:
β’ Constantly switching between AWS regions to check instance status
β’ Difficulty getting a consolidated view of all running instances
β’ Time wasted navigating through the AWS Console for simple operations
β’ Need for a quick way to stop or terminate instances across regions
These challenges inspired me to create a simple yet powerful solution that runs entirely in your browser.
Introducing AWS EC2 Instance Manager
The AWS EC2 Instance Manager is a static web application that provides a unified interface for managing EC2 instances across all AWS regions. What makes this tool special is its simplicity - there's no
backend server, no complex setup, and no additional infrastructure required.
Key Features
Cross-Region Visibility
The application automatically discovers and queries all AWS regions, providing a single dashboard view of your EC2 instances. This eliminates the need to manually switch between regions in the AWS
Console.
Focus on Active Resources
The tool shows only running instances by default, helping you focus on active resources that might be incurring costs. This filtering makes it easier to identify instances that could potentially be
stopped to optimize your AWS spending.
Streamlined Instance Management
With just a single click, you can stop or terminate instances directly from the interface. This streamlined approach saves valuable time compared to navigating through the AWS Console for each action.
Security-First Design
Security is a top priority. The application handles AWS credentials with care - they're stored only in memory and never persisted or sent to any server other than AWS directly. This client-side only
architecture minimizes security risks.
Responsive Interface
Whether you're at your desk or on the go, the responsive design ensures the tool works seamlessly across desktop and mobile browsers.
Technical Implementation
The AWS EC2 Instance Manager is built with simplicity in mind:
β’ Pure Web Technologies: The application uses vanilla HTML, CSS, and JavaScript without any frameworks, keeping it lightweight and fast.
β’ AWS SDK for JavaScript: Leverages the AWS SDK v2 to interact with AWS services directly from the browser.
β’ Client-Side Architecture: All processing happens in your browser, with no server-side components required.
This approach makes the tool incredibly portable - you can run it from any computer with a modern web browser.
Getting Started
Using the EC2 Instance Manager is straightforward:
- Clone or download the repository from GitHub
- Open the index.html file in your web browser
- Enter your AWS credentials (Account ID, Access Key ID, and Secret Access Key)
- Click "Connect to AWS" to fetch your running instances
- Use the provided buttons to stop or terminate instances as needed
Required Permissions
To use the tool effectively, your AWS credentials need these specific permissions:
β’ ec2:DescribeRegions - To discover all available AWS regions
β’ ec2:DescribeInstances - To list EC2 instances in each region
β’ ec2:StopInstances - To stop running instances
β’ ec2:TerminateInstances - To terminate instances when needed
Security Considerations
While the tool is designed with security in mind, it's important to note that storing AWS credentials in a browser application is not recommended for production environments. For production use, consider
these more secure alternatives:
β’ Implement authentication using Amazon Cognito
β’ Create a backend using API Gateway and Lambda to handle AWS operations
β’ Use proper IAM roles with least privilege principles
Future Roadmap
This is just the beginning for the EC2 Instance Manager. Future enhancements may include:
β’ Adding the ability to start stopped instances
β’ Including more detailed instance information and advanced filtering options
β’ Expanding support to other AWS resources like RDS databases and Lambda functions
β’ Implementing secure credential storage with Amazon Cognito
Troubleshooting Tips
If you encounter issues while using the tool:
β’ Verify your AWS credentials are correct and have the necessary permissions
β’ Ensure you have running EC2 instances in your account
β’ Check your browser's console for any error messages
β’ Make sure your browser isn't blocking scripts from loading
Conclusion
The AWS EC2 Instance Manager demonstrates how a simple tool can significantly improve the efficiency of cloud resource management. By providing a consolidated view of EC2 instances across all regions and
enabling quick actions, it saves valuable time for AWS users.
I built this tool to address a common pain point in my own AWS management workflow, and I hope it proves useful for others facing similar challenges. The project is open-source and available for anyone to
use, modify, and improve.
Whether you're managing a handful of instances or a large fleet across multiple regions, this tool can help streamline your EC2 management tasks and provide better visibility into your AWS resources.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
This project was developed by Yeshwanth L M at A Monk in Cloud. The AWS EC2 Instance Manager is licensed under the MIT License, making it freely available for personal and
commercial use.
Top comments (0)