anchor.diff:  instance_id = product_hash['instance_id']
   order_id = order_item_hash['id']
   headers = [$evm.root['dialog_email'], $evm.root['dialog_token']]
  +endpoint = $evm.root['dialog_referer']
   
   ec2 = AWS::EC2.new(
     access_key_id: access_key_id,
  
positive.code:     $evm.log('info', 'RetireEC2: instance terminated.')
    rescue AWS::EC2::Errors::InvalidClientTokenId => e
      $evm.log('error', "RetireEC2: Invalid client token exception caught: #{e.message}")
      send_order_status(host, headers, 'CRITICAL', order_id, info, "#{e.message}")
      exit
    rescue AWS::EC2::Errors => e
      $evm.log('error', "RetireEC2: Exception caught #{e.message}")
      send_order_status(host, headers, 'CRITICAL', order_id, info, "#{e.message}")
      exit
    end
    send_order_status(host, headers, 'OK', order_id, info)
  else
    $evm.log('error', "RetireEC2: Instance #{instance_id} does not exist.")
    send_order_status(host, headers, 'CRITICAL', order_id, info, 'instance does not exist')
  end
  
  $evm.log('info', 'RetireEC2: Instance retired.')
  
  send_order_status(host, headers, 'OK', order_id, info, 'Instance retired.')
  
negative.code:   instance = ec2.instances[instance_id]
  rescue AWS::EC2::Errors::InvalidClientTokenId => e
    $evm.log('error', "RetireEC2: Invalid Token Id exception caught: #{e.message}")
    send_order_status(endpoint, headers, 'CRITICAL', info, "#{e.message}")
    exit
  rescue AWS::EC2::Errors => e
    $evm.log('error', "RetireEC2: EC2 exception caught: #{e.message}")
    send_order_status(endpoint, headers, 'CRITICAL', info, "#{e.message}")
    exit
  end
  
  