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 年前檢視次數 240 次
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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南