Answer of Linux domain Q3 is explained https://kodekloud.com/topic/linux-question-3
I’ve question when EC2 instance is terminating
How can we login to the instance to check resource utilization?
Can’t we check logs of EC2 instance on AWS dashboard?
Thank you in advance.
This is about EC2 instances getting terminated that are attached to an Auto Scaling Group (ASG). Know that an autoscaling group attempts to keep the desired number of instances at a constant value, so when it terminates one it will launch another, which will be healthy until the condition that makes it fail occurs.
You wat for a new instance to be created, then you log into this instance and run diagnostic tools. You identify here what is causing CPU, disk or memory to run out and keep watching it until the terminal comes unresponsive or you get logged out due to the ASG terminating again.