Can a stress test artificially kill an ec2 instance?

0

https://launchpad.net/ubuntu/focal/amd64/stress/1.0.4-6

I want to check the value of the StatusFailChecked metric in cloudwatch after forcibly taking down the EC2 Instance as a stress test in the link above. (I wonder if the value of this metric will change if it goes down) However, it seems that the stress program is forcibly terminated when CPU or Memory is used above a certain percentage. Can't I force terminate the instance with that method? I'm also curious if it's possible to forcefully terminate the EC2 Instance as a stress test, and if so, how.

已提问 1 年前234 查看次数
1 回答
0

You can use AWS Fault Injection Simulator (AWS FIS) to test how your applications handle CPU stress. You can refer to this tutorial to create an experiment template that uses AWS FIS to run a pre-configured SSM document that runs CPU stress on an instance. The tutorial uses a stop condition to halt the experiment when the CPU utilization of the instance exceeds a configured threshold. Configure a CloudWatch alarm so that you can stop the experiment if CPU utilization exceeds the threshold that you specify.

Reference : https://docs.aws.amazon.com/fis/latest/userguide/fis-tutorial-run-cpu-stress.html

profile pictureAWS
专家
已回答 1 年前

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

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

回答问题的准则