mardi 27 janvier 2015

Using a stop alarm with a g2.2xlarge instance on Amazon's ec2 aws

While working with a g2.2xlarge spot instance, I have tried to set up an alarm that will notify me when the average CPU usage over a two hour period has dropped below 5% and will then automatically stop the instance. Here's a link to a nice article Amazon wrote up on how to use the stop/start instance feature. The AWS alarms seem to allow you to do this however after the trigger goes off I get this reply:



Dear AWS customer,


We are unable to execute the 'Stop' action on Amazon EC2 instance i-e60e21ec that you specified in the Amazon CloudWatch alarm awsec2-i-e60e21ec-Low-CPU-Utilization.


You may want to check the alarm configuration to ensure that it is compatible with your instance configuration. You can also attempt to execute the action manually.


These are some possible reasons for this failure and steps you can try to resolve it:


Incompatible action selected: Your instance’s configuration may not be compatible with the selected action.



  • To execute the 'Terminate' action, your instance may have Termination Protection enabled. Disable this feature if you want to terminate your instance. Once you do that, the alarm will execute the action after the next applicable alarm state change.

  • To execute the 'Stop' action, your instance’s root device type must be an EBS volume. If the root device type is the instance store, select the 'Terminate' action instead. Once you do that, the alarm will execute the action after the next applicable alarm state change.


Temporary service interruption: There may have been an issue with Amazon CloudWatch or Amazon EC2. We have retried the action without success. You can try to execute the action manually, or wait for the next applicable alarm state change.


Sincerely, Amazon Web Services



Stop seems to be an option for the free micro instance but not for these other instances. When I try to change the shutdown behavior to stop in actions it says:



An error occurred while changing the shutdown behavior of this instance. Modifying 'instanceInitiatedShutdownBehavior is not supported for spot instances.



Is there another way to get around this problem or will we have to wait until Amazon makes this feature available?





Aucun commentaire:

Enregistrer un commentaire