How do I set an alarm to terminate an EC2 instance using boto?
问题 I have been unable to find a simple example which shows me how to use boto to terminate an Amazon EC2 instance using an alarm (without using AutoScaling). I want to terminate the specific instance that has a CPU usage less than 1% for 10 minutes. Here is what I've tried so far: import boto.ec2 import boto.ec2.cloudwatch from boto.ec2.cloudwatch import MetricAlarm conn = boto.ec2.connect_to_region("us-east-1", aws_access_key_id=ACCESS_KEY, aws_secret_access_key=SECRET_KEY) cw = boto.ec2