What are EC2 instance states?

EC2 instance states

EC2 Instance States Explained for Your WordPress Blog on AWS

Amazon EC2 (Elastic Compute Cloud) instances go through different states during their lifecycle. Understanding these states is crucial for managing your WordPress blog efficiently. Below are the EC2 instance states explained in detail:


1. Pending

  • This is the initial state when you launch an instance.
  • AWS is allocating resources (CPU, memory, storage, and networking) and booting the virtual machine.
  • Your instance remains in this state for a few seconds before transitioning to Running.

Example: After launching a new EC2 instance to host your WordPress blog, it stays in the “Pending” state until it’s fully initialized.


2. Running

  • The instance is active and operational.
  • You can SSH into it, install software, and start hosting your WordPress blog.
  • AWS starts billing you for this instance as long as it remains in this state.

Example: Once the instance is running, you can connect via SSH, install Apache/Nginx, set up MySQL, and deploy your WordPress site.


3. Stopping

  • The instance is in the process of shutting down.
  • Any in-progress operations will be interrupted.
  • You cannot connect to the instance during this time.
  • Data stored on EBS (Elastic Block Store) volumes remains intact.

Example: If you decide to stop the instance temporarily to save costs, it enters the “Stopping” state before transitioning to “Stopped.”


4. Stopped

  • The instance is completely shut down but not terminated.
  • You are not billed for compute (EC2 instance usage) but are still charged for storage (EBS volumes).
  • You can restart it anytime, and the instance will retain its configurations, but its public IP address may change unless you use an Elastic IP.

Example: If you are not using your WordPress blog for a few hours or days, you can stop the instance to save money.


5. Shutting Down

  • This state occurs when an instance is being terminated.
  • Unlike “Stopping,” this process is irreversible.
  • The instance transitions to Terminated once the shutdown completes.

Example: If you decide to delete your instance permanently, it enters the “Shutting Down” state before termination.


6. Terminated

  • The instance is permanently deleted, and all data stored on the root volume (unless configured otherwise) is lost.
  • You cannot restart the instance once it reaches this state.
  • You are no longer billed for the instance.

Example: If you no longer need your WordPress blog and want to remove it completely, you terminate the instance.


About Anant 394 Articles
Senior technical writer