def cleanup(node_name = None): config = aws.read_config() if node_name: if config.has_section(node_name): aws.terminate_instance(node_name) else: for section in config.sections(): aws.terminate_instance(section)
def cleanup(node_name=None): """ destroys AWS EC2 isntances """ config = aws.read_config() if node_name: if config.has_section(node_name): aws.terminate_instance(node_name) else: for section in config.sections(): aws.terminate_instance(section)