def delete_key_pair(region, pair_name)
      kp = client(region).describe_key_pairs(:key_names => [pair_name]).key_pairs.first
      unless kp.nil?
        @logger.debug("aws-sdk: delete key pair in region: #{region}")
        client(region).delete_key_pair(:key_name => pair_name)
      end
    rescue Aws::EC2::Errors::InvalidKeyPairNotFound
      nil
    end
def delete_key_pair(region, pair_name)
      kp = client(region).describe_key_pairs(:key_names => [pair_name]).key_pairs.first
      unless kp.nil?
        @logger.debug("aws-sdk: delete key pair in region: #{region}")
        client(region).delete_key_pair(:key_name => pair_name)
      end
    rescue Aws::EC2::Errors::InvalidKeyPairNotFound
      nil
    end
Deletes a given key pair

 @param [Aws::EC2::Region] region the region the key belongs to
 @param [String] pair_name the name of the key to be deleted

 @api private