I have an EC2-instance inside Elastic Beanstalk environment, which was terminated for reasons unknown. The only information I possess is state transition reason
Client.UserInitiatedShutdown: User initiated shutdown.
I use this environment alone and I am sure that I haven't initiated shutdown by myself, so this must be EB.
In events there is only one record: instance 'i-6252b1a3' has been removed from your environment
. There is no mention of terminating this instance in EB logs too. How can I else get information why this instance was terminated?
It happens when you reached your Elastic Block Store (EBS) volume limit, especially when its the free-tier server. The error can be misleading as it says:
user initiated shutdown
See "What To Do If An Instance Immediately Terminates" for more information about diagnosing instance termination.
AWS CloudTrail helps but if its not set up to monitor the instance shutdown it will not give you any details.
If monitoring has not been set up in your EC2 dashboard, no alarms set up to recover during a monitoring failure then there is no way of recovering a terminated server.
If you have created a snapshot you can restore it or if the server has already been terminated you may create a new instance from the backup.
This way you dont have to change your server app but the mobile and other apps that use the webservice/api.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With