Amazon AWS Instance Management


Last modified: July 25, 2022

Overview

After you create an instance with the cPanel & WHM Amazon Machine Image™ (AMI), you can manage that instance from within the Amazon Web Services™ (AWS) Management Console. This document describes common instance-management tasks that your cPanel & WHM instance may require.

Note:
  • For more information about AWS instance management, read Amazon’s® Working with the AWS Management Console documentation.
  • AWS systems may encounter package conflicts when the system attempts to update certain libraries (generally, libstdc++ libraries). These errors occur due to the way in which AWS manages packages.To resolve this issue, use your server’s package manager to remove the conflicting package.

  • For video tutorials about this process, view the cPanel and Amazon AWS playlist on our YouTube channel.

Access your instance for the first time

Note:
  • To improve security for your system, the cPanel & WHM AMI automatically runs the /usr/local/cpanel/upcp script after the instance initializes. This script may alter the AMI’s version number. Also, the WHM interface may display a license error if you click any update links while the update script runs as a background task.
  • New instances may require several minutes to initialize. Until the initialization process finishes, the Status Checks column of the EC2™ Management Console will display Initializing and a clock icon.

To access a new instance, perform the following steps:

  1. Sign in to your AWS account.

  2. From the Services menu in the top-left corner, select EC2 under Compute. The EC2 Management Console will appear.

  3. In the left-side menu under Instances, click Instances. The list of instances will appear.

  4. In the list of instances, or at the bottom of the interface in the Details tab, locate the following values:

    • Public IPv4 address — The public IP address for the instance.

      Important:

      You must set the hostname correctly before you can license the server.

    • Key Name (Key pair name in the Details tab) — The name of the key pair that you used when you created the instance.

  5. To connect to the instance via SSH, run the following command, where example represents the key pair name and IPADDRESS represents the public IP address:

  6. To escalate to the root account, run the sudo su command.

  7. To change the root user’s password, run the passwd command. The system will prompt you to enter a new password.

  8. Enter the desired password and press Enter. The system will prompt you to confirm the password.

  9. Reenter the desired password and press Enter. A confirmation message will appear.

  10. If you wish to access WHM in your browser, perform the following additional steps:

    1. Navigate to the following address, where IPADDRESS represents the public IP address:

    2. Use the root password to log in to the WHM interface as the root user.

More:

For more information, read our How to Access the Command Line and How to Log in to Your Server or Account documentation.

Manage instances

Important:
  • We strongly recommend that you stop unused instances to avoid unnecessary costs.
  • If you stop an instance, Amazon retains the instance’s basic information, but removes some data. For example, when you restart the instance, AWS will generate a new DNS hostname and IP address.

To start, stop, reboot, or terminate an instance, perform the following steps:

  1. Sign in to your AWS account.

  2. From the Services menu in the top-left corner, select EC2 under Compute. The EC2 Management Console will appear.

  3. In the left-side menu under Instances, click Instances. The list of instances will appear.

  4. Select the desired instance from the list.

    Note:

    To update multiple instances, select all of the desired instances.

  5. At the top of the list of instances, click Actions. The Actions menu will display.

  6. Select Manage instance state, and choose the desired setting:

    • Start — Restart the instance, which you must have previously stopped.

    • Stop — Pause the instance and retain some, but not all, of its data.

    • Reboot — Reboot the instance.

    • Terminate — Permanently delete the instance.

      Warning:

      When you terminate an instance, the system will delete the instance’s data.

      • Termination will not delete EBS volumes unless you enable the Delete on Termination setting.
      • You cannot restore a terminated instance.

  7. Click Change state. A confirmation message will appear. Confirm your action.

  8. The Instance state column in the list of instances displays the instance’s state.

    Note:

    The system may require several minutes to stop or terminate the instance.

Additional Documentation