I have some tools that monitor the status checks of all my organisation's EC2 instances. I'd like to test them by deliberately inducing a failure of the reachability status check (that comes by default with all EC2 instances, pictured in the EC2 console below) on one of my instances - ideally through some means that lets me individually break the InstanceStatus version of the check and the SystemStatus version.

Screenshot of the EC2 console, showing the reachability status checks.

How can I do this?


I typed your query into Google ("test aws instance status checks") and found this page on the AWS forum which has two ways to do it.

An easy way to trigger a status check failure is to disable the default NIC in the instance. For Linux instances,

sudo ifconfig eth0 down

should do the trick.

Recovery is by adding an additional ENI to the instance and connecting in through that, then bringing the original ENI up with "sudo ifconfig eth0 up".

The same page has this

I know this is an old post, but I saw a suggestion from another post on reddit/r/aws. It looks like you can temporarily set a different state for an alarm. I mention temporary because during the next period, the alarm will be re-evaluated for it's new state.

Taking a look at the docs I think you should be able to do the following:

aws cloudwatch set-alarm-state \
  --alarm-name "ec2_system_alarm" \
  --state-value ALARM \
  --state-reason "simulate an ec2 system failure"
  • This doesn't provide a way to break the system reachability status check, only the instance reachability status check, but is nonetheless useful; +1. (It's not obvious to me whether there even is a way to make the system reachability status check fail.) – Mark Amery Jan 22 at 13:40
  • System status checks are checks for the underlying hardware. To test that you would need physical access to the AWS data centre. – Tim Jan 22 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.