Skip to content

EC2 instance terminated after reboot

0

So basically I went into my instance summary and from "Instance state" i rebooted it and closed the window, after some minutes passed my server was still not online so i went to check the state of the instance. When i went to the instances list mi server was "Terminated" ad a new instance was listed, with no name, no elastic IP but same security groups, encription key and instance type as the server i rebooted. The "new" instance however looks broken, as it doesn't even have mariadb or apache installed and not even the /var/www/ directory and it has a/home/ubuntu/ diretory but is empty, no Documents, Downloads etc. Before the terminated server was delisted from my instances i managed to take a quick look ate the "Details" tab and launch time was "Tue Jul 02 2024 16:56:59 GMT+0200 (Central European Summer Time)" while the launch time of the new instance is "Tue Jul 02 2024 16:57:04 GMT+0200 (Central European Summer Time)".

I have the project that was running on the server is saved on github however the database was not backed up recently so i only have an obsolete version of it. Is there any way i can restore the instance or at least only the EBS? Anyone had a similar thing happening or have any idea what could have happened?

asked 2 years ago376 views
1 Answer
0

Hello.

Are you managing your EC2 instances with Spot Instances or AutoScaling?
If you are running EC2 with AutoScaling or Spot Instances, it may disappear automatically.
https://repost.aws/knowledge-center/troubleshoot-ec2-instance-terminate

Also, data restoration is not possible unless EBS snapshots remain.
If the snapshot remains, you can restore data up to the time the snapshot was taken.
https://docs.aws.amazon.com/ebs/latest/userguide/ebs-snapshots.html

EXPERT
answered 2 years ago
EXPERT
reviewed 2 years ago
  • yes, the instance is part of an autoscaling group. I checked the Activity history and it says that "an instance was taken out of service in response to an EC2 health check indicating it has been terminated or stopped" and immediatly after that "an instance was launched in response to an unhealthy instance needing to be replaced" but the launched instance seems to not be working properly

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.