Skip to content

A full-stack web application for managing AWS EC2 and RDS instances with a user-friendly interface.

Notifications You must be signed in to change notification settings

yulakhraj/AWS-DASHBOARD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Resource Dashboard

A full-stack web application for managing AWS EC2 and RDS instances with a user-friendly interface.

Features

  • 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

Technology Stack

Frontend

  • React.js (Frontend Framework)
  • React Router (Navigation)
  • Axios (HTTP Client)
  • CSS (Styling)

Backend

  • Node.js with Express.js
  • AWS SDK v3 (@aws-sdk)
  • Winston (Logging)
  • CORS (Cross-Origin Resource Sharing)

AWS Services

  • EC2 (Elastic Compute Cloud)
  • RDS (Relational Database Service)
  • STS (Security Token Service)

Project Structure

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

Prerequisites

  1. Node.js (v14 or higher)
  2. NPM (v6 or higher)
  3. AWS Account and Credentials
  4. AWS CLI configured locally

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd MySampleProject
  2. Install Backend Dependencies:

    cd backend
    npm install
  3. Install Frontend Dependencies:

    cd ../frontend
    npm install
  4. Configure AWS Credentials: Ensure your AWS credentials are properly configured either through:

    • AWS CLI (aws configure)
    • Environment variables
    • IAM role

Configuration

  1. Backend Environment Variables: Create .env file in the backend directory:

    AWS_REGION=your-aws-region
    PORT=5000
    
  2. Frontend Environment Variables: Create .env file in the frontend directory:

    REACT_APP_API_URL=http://localhost:5000
    

Running the Application

Using the Startup Script

Run the provided batch script to start both services:

abc.bat

Manual Start

  1. Start Backend:

    cd backend
    npm start
  2. Start Frontend:

    cd frontend
    npm start

The application will be available at:

API Endpoints

EC2 Endpoints

  • GET /ec2 - List all EC2 instances
  • GET /ec2/details/:instanceId - Get instance details
  • POST /ec2/start - Start an EC2 instance
  • POST /ec2/stop - Stop an EC2 instance

RDS Endpoints

  • GET /rds - List all RDS instances
  • GET /rds/details/:dbInstanceId - Get instance details
  • POST /rds/start - Start an RDS instance
  • POST /rds/stop - Stop an RDS instance

Security Considerations

  1. AWS credentials should be properly secured
  2. Use appropriate IAM roles and policies
  3. Backend API should be secured in production
  4. Environment variables should be protected

Error Handling

The application includes comprehensive error handling:

  • AWS service errors
  • Network issues
  • Instance state conflicts
  • Permission issues

Logging

Winston logger is configured to log:

  • API requests and responses
  • AWS operations
  • Error details
  • Instance state changes

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A full-stack web application for managing AWS EC2 and RDS instances with a user-friendly interface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published