old_contents: import boto.ec2
  
  # EU-WEST-1: RHEL7 HVM
  AMI_ID = 'ami-25158352'
  
  class Machine:
  
  	@staticmethod
  	def create_new(data):
  		# boto create instance
  		name = data['name']
  		cpu = int(0 if not 'cpu' in data else data['cpu'])
  		memory = int(0 if not 'memory' in data else data['memory'])
  		disk = int( 0)
  		region = str('eu-west-1')
  		metadata = {}
  
  		security_groups = [ 'sg-fb4c1a9e' ]
  		connection = boto.ec2.connect_to_region(region)
  		image_id = connection.run_instances(AMI_ID,
  				instance_type='m3.medium').instances[0].id
  
  		return image_id
  
  
  	@staticmethod
  	def delete_instance(instanceId, region):
  		connection = boto.ec2.connect_to_region(region)
  		connection.terminate_instances(instance_ids=[instanceId])
  		return True
  
new_contents: import boto.ec2
  import muliprocessing
  
  # EU-WEST-1: RHEL7 HVM
  AMI_ID = 'ami-25158352'
  
  pool = muliprocessing.Pool()
  
  class Machine:
  
  	@staticmethod
  	def create_many(definitions):
  		return pool.map(Machine.create_new, definitions)
  
  
  	@staticmethod
  	def create_new(data):
  		# boto create instance
  		name = data['name']
  		cpu = int(0 if not 'cpu' in data else data['cpu'])
  		memory = int(0 if not 'memory' in data else data['memory'])
  		disk = int( 0)
  		region = str('eu-west-1')
  		metadata = {}
  
  		security_groups = [ 'sg-fb4c1a9e' ]
  		connection = boto.ec2.connect_to_region(region)
  		image_id = connection.run_instances(AMI_ID,
  				instance_type='m3.medium').instances[0].id
  
  		return image_id
  
  
  	@staticmethod
  	def delete_instance(instanceId, region):
  		connection = boto.ec2.connect_to_region(region)
  		connection.terminate_instances(instance_ids=[instanceId])
  		return True
  
subject: Add create many machines