A full-stack web application for managing AWS EC2 and RDS instances with a user-friendly interface.
- View and manage EC2 instances
- View and manage RDS instances
- Start/Stop instance operations
- Real-time status updates
- Detailed instance information
- Search functionality
- Comprehensive error handling
- Secure AWS integration
- React.js (Frontend Framework)
- React Router (Navigation)
- Axios (HTTP Client)
- CSS (Styling)
- Node.js with Express.js
- AWS SDK v3 (@aws-sdk)
- Winston (Logging)
- CORS (Cross-Origin Resource Sharing)
- EC2 (Elastic Compute Cloud)
- RDS (Relational Database Service)
- STS (Security Token Service)
AWS-DASHBOARD/
├── frontend/ # React frontend application
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── styles/ # CSS styling files
│ │ ├── assets/ # Images and static assets
│ │ └── App.js # Main application component
│ ├── public/ # Public assets
│ └── package.json # Frontend dependencies
│
├── backend/ # Node.js backend server
│ ├── server.js # Main server file
│ └── package.json # Backend dependencies
│
└── abc.bat # Startup script for both services
- Node.js (v14 or higher)
- NPM (v6 or higher)
- AWS Account and Credentials
- AWS CLI configured locally
-
Clone the repository:
git clone <repository-url> cd MySampleProject
-
Install Backend Dependencies:
cd backend npm install
-
Install Frontend Dependencies:
cd ../frontend npm install
-
Configure AWS Credentials: Ensure your AWS credentials are properly configured either through:
- AWS CLI (
aws configure
) - Environment variables
- IAM role
- AWS CLI (
-
Backend Environment Variables: Create
.env
file in the backend directory:AWS_REGION=your-aws-region PORT=5000
-
Frontend Environment Variables: Create
.env
file in the frontend directory:REACT_APP_API_URL=http://localhost:5000
Run the provided batch script to start both services:
abc.bat
-
Start Backend:
cd backend npm start
-
Start Frontend:
cd frontend npm start
The application will be available at:
- Frontend: http://localhost:3000
- Backend: http://localhost:5000
GET /ec2
- List all EC2 instancesGET /ec2/details/:instanceId
- Get instance detailsPOST /ec2/start
- Start an EC2 instancePOST /ec2/stop
- Stop an EC2 instance
GET /rds
- List all RDS instancesGET /rds/details/:dbInstanceId
- Get instance detailsPOST /rds/start
- Start an RDS instancePOST /rds/stop
- Stop an RDS instance
- AWS credentials should be properly secured
- Use appropriate IAM roles and policies
- Backend API should be secured in production
- Environment variables should be protected
The application includes comprehensive error handling:
- AWS service errors
- Network issues
- Instance state conflicts
- Permission issues
Winston logger is configured to log:
- API requests and responses
- AWS operations
- Error details
- Instance state changes
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.