Thursday 11 April 2019

How to get the termination reason of our EC2 server by Raj Gupta

We can use the Amazon EC2 console or AWS Command Line Interface to get the termination reason.



To get the termination reason using the Amazon EC2 console

Open the EC2 console --> Select the instance --> Go to Description tab --> Then check the value of State transition reason message



To get the termination reason using the AWS Command Line Interface:-

We need a system that may be on-premise or AWS system in which AWS CLI tool is already install

then need to run the below command

[root@ip-172-31-83-180 ~]# aws ec2 describe-instances --instance-id i-02de445d52343b5b9

Output:- Then we will get the reason for our server termination like below:-

   "StateReason": {
                        "Message": "Client.UserInitiatedShutdown: User initiated shutdown",
                        "Code": "Client.UserInitiatedShutdown"
                    },

I have terminated EC2 by myself that why we got error like above..
i-02de445d52343b5b9   -----> This is instace ID of our terminated EC2 server ..check below pic





  • If the reason is Client.VolumeLimitExceeded: Volume limit exceeded,you have reached your EBS volume limit
  • If the reason is Client.InternalError: Client error on launch, that typically indicates that the root volume is encrypted and that you do not have permissions to access

No comments:

Post a Comment