aws/ec2-reboot

Reboot EC2 Instance

Reboot an EC2 instance without changing its state.

aws
ec2
reboot

Command

aws ec2 reboot-instances --instance-ids i-1234567890abcdef0

Explanation

Performs a soft reboot on the instance, similar to using the operating system's reboot command.

Common Use Cases

  • Applying system updates or configuration changes
  • Restarting unresponsive instances

Best Practices

  • Use for maintenance tasks instead of stop/start when persistence is needed

Common Mistakes to Avoid

  • Using reboot expecting IP or state change (neither happens)

Troubleshooting

Problem: Reboot command fails

Solution: Check instance ID and ensure the instance is running.

Examples

Reboot instance by ID

aws ec2 reboot-instances --instance-ids i-1234567890abcdef0