Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

EC2 Management Portal

A simple interactive Bash CLI tool to manage AWS EC2 instances using the AWS CLI.
It provides a convenient menu-driven interface to list, start, stop, reboot, view details, terminate instances, and check their health status.

Architectural Diagram:


Features

  • List all EC2 instances in a given AWS region (with names and states)
  • Start instances
  • Stop instances
  • Reboot an instance
  • View detailed instance information in a table format
  • Terminate an instance
  • Check instance health status (system, instance, and reachability)

Prerequisites

  • AWS CLI installed and configured with appropriate credentials and permissions.
  • Bash shell environment.
  • IAM permissions required for the actions used by the script (see below).

Required IAM Permissions

Ensure your IAM user or role has the following permissions:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ec2:DescribeInstances",
        "ec2:DescribeInstanceStatus",
        "ec2:DescribeTags"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "ec2:StartInstances",
        "ec2:StopInstances",
        "ec2:RebootInstances",
        "ec2:TerminateInstances"
      ],
      "Resource": "*"
    }
  ]
}

Usage

  1. Clone or download this repository.

  2. Ensure the script is executable:

    chmod +x ec2-portal.sh
  3. Run the script:

    ./ec2-portal.sh
  4. Follow the interactive menu to manage your EC2 instances.


Configuration

  • The script defaults to the AWS region us-east-1. To change it, modify the REGION variable near the top of the script.

Example Output

Main menu:

Option 1:

Option 3:

Option 6:

Option 7:

Option 5:


Notes

  • Terminating an instance is permanent and cannot be undone.
  • The script requires AWS CLI configured with credentials that have the necessary permissions.

Author

Developed by Mohamed Boussas

GitHub: @boussas


If you have questions or feature requests, please open an issue or contact me.

About

A simple interactive Bash CLI tool to manage AWS EC2 instances using the AWS CLI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages