# How to restart an EC2 instance

How-to guides · Updated 16 November 2026

**Short answer:** Select the instance in the EC2 console and choose Instance state, then Reboot instance, or run aws ec2 reboot-instances --instance-ids i-0123456789abcdef0. A reboot keeps the same host, IP addresses and instance store data. If the instance is unresponsive because of a hardware or host problem, a stop followed by a start is the restart that actually helps, because it moves the instance to new hardware.

## Reboot or stop/start?

| | Reboot | Stop, then start |
|---|---|---|
| Underlying host | Same | Usually different |
| Public IPv4 (not Elastic IP) | Kept | Changes |
| Instance store data | Kept | Lost |
| Fixes a failed *system* status check | No | Usually |
| Typical use | Kernel update, hung service, applying OS config | Host problems, resizing, scheduled retirement |

If the status checks show a [system status check failure](https://cloudconsole.dev/errors/ec2-system-status-check-failed), skip the reboot and do a stop/start. If it is an [instance status check failure](https://cloudconsole.dev/errors/ec2-instance-status-check-failed), a reboot is the right first move.

## From the console

1. Open the Amazon EC2 console and go to **Instances**.
2. Select the instance and choose **Instance state** > **Reboot instance**, then confirm.
3. The state stays `running` throughout; watch the **Status checks** column return to passing.

For a stop/start, choose **Stop instance**, wait for `stopped`, then **Start instance**.

## From the command line

```
# Reboot (asynchronous: returns immediately)
aws ec2 reboot-instances --instance-ids i-0123456789abcdef0

# Confirm it came back: both checks should report "ok"
aws ec2 describe-instance-status --instance-ids i-0123456789abcdef0 \
  --query 'InstanceStatuses[].{system:SystemStatus.Status,instance:InstanceStatus.Status}'

# Full stop/start to move to new hardware
aws ec2 stop-instances --instance-ids i-0123456789abcdef0
aws ec2 wait instance-stopped --instance-ids i-0123456789abcdef0
aws ec2 start-instances --instance-ids i-0123456789abcdef0
aws ec2 wait instance-status-ok --instance-ids i-0123456789abcdef0
```

From inside the instance, `sudo reboot` (Linux) or a Windows restart does the same as the API reboot. The API reboot asks the OS to shut down cleanly; if the OS doesn't comply within a few minutes, EC2 forces a hard reboot.

## Check before and after

- **Before:** grab the serial console output with [get-console-output](https://cloudconsole.dev/cli/ec2-get-console-output) if the instance is hung. It often shows a kernel panic or a full disk that a reboot will hide.
- **Before a stop/start:** make sure nothing important lives on instance store, and that DNS or allow-lists don't depend on the public IP.
- **Scheduled events:** `describe-instance-status` also lists any scheduled events, such as an instance retirement. For a retirement, an OS reboot doesn't help; a stop/start before the deadline moves the instance to healthy hardware at a time you choose.
- **After:** confirm services started on boot (systemd units enabled, Windows services set to automatic) and that the instance is healthy again in its load balancer target group.

## Common mistakes

- **Rebooting repeatedly to fix a system check failure.** The host is the problem; only moving off it helps.
- **Restarting an Auto Scaling instance with stop/start.** The group sees a stopped instance and replaces it. Reboot instead, or use Standby.
- **Expecting `reboot-instances` to wait.** It returns at once and there is no reboot waiter; poll status checks as above.

## Questions

### How do I restart an EC2 server from the command line?

Use aws ec2 reboot-instances --instance-ids with the instance ID. To force it onto new hardware, stop it, wait for the stopped state and start it again.

### Does restarting an EC2 instance change its IP address?

A reboot keeps every address. A stop and start keeps the private IP and any Elastic IP, but an automatically assigned public IPv4 address changes.

### How long does an EC2 reboot take?

Usually about as long as the operating system takes to boot, often a minute or two. If the OS hangs on shutdown, EC2 forces the reboot after a few minutes.

## When this happens away from your desk

A hung instance at 2am is where a reboot from your phone would save the walk to the laptop. CloudConsole, a phone app for AWS, is built to show instance status checks and alarms on your phone, with production guardrails on actions.

[About the CloudConsole app](https://cloudconsole.dev/aws-console-app) · [Download on the App Store](https://apps.apple.com/app/cloudconsole-for-aws/id6835419710)

## Sources

- [Reboot your Amazon EC2 instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-reboot.html)
- [Stop and start Amazon EC2 instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html)

## Related

- [aws ec2 reboot-instances](https://cloudconsole.dev/cli/ec2-reboot-instances)
- [aws ec2 describe-instance-status](https://cloudconsole.dev/cli/ec2-describe-instance-status)
- [How to stop an EC2 instance](https://cloudconsole.dev/how-to/stop-ec2-instance)
- [EC2 system status check failed](https://cloudconsole.dev/errors/ec2-system-status-check-failed)
- [EC2 instance status check failed](https://cloudconsole.dev/errors/ec2-instance-status-check-failed)
- [CloudWatch alarm: EC2 StatusCheckFailed](https://cloudconsole.dev/alarms/ec2-statuscheckfailed)

---

Source: https://cloudconsole.dev/how-to/restart-ec2-instance

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
