EC2 instance just stopped working. What happened?

0

Recently our running EC2 instance (t2.micro) failed and we weren't able to login anymore. Even though in the EC2 console it had Online Ping Status. So we had to Stop it and Start it again, which changed the IP address of the site, and caused some issues in our IoT online platform :(

To understand what happened, I checked for that EC2 instance reports with different metrics, and I see in the exact moment when it stopped working, the CPU usage increased suddenly to 100% and Network In Data also increased in a very unusual way. This is a very high peak druing a minute, in a whole year and several months that it had been working with no single issue. Also the FailChecksum graph was high from that moment until we Stopped and Started the EC2 instance again. Graphs here: https://ibb.co/qsgPXXs https://ibb.co/YhpQHmQ https://ibb.co/MSYmN8g

Do you have any idea of what could cause this anomaly? And which would be the way to find out exactly? Is is this a common issue?

Thank you in advance for any help.

已提问 2 年前336 查看次数
2 回答
1

Have you tried using the Amazon Cloudwatch agent to acquire more information? You might also try using Amazon Inspector if you suspect a malicious actor. Another option is to use an Application Performance Monitoring Tool if you cannot instrument your application, or Amazon X-Ray, if you can instrument your code.

profile pictureAWS
已回答 2 年前
1

As you've already found, an EC2 instance launched in a Public Subnet can be assigned a public IP address but the association only lasts as long as the instance is running. This is fine for testing/infrequent processing activities but not an advisable approach when running production/critical infrastructure. I would recommend you associate an Elastic IP address with your instance which will allow you to retain the same IP across any future restart/termination events.

It's also worth you reviewing the EC2 Best Practices to ensure your infrastructure is reliable and secure.

已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则