'Attach a network interface to an instance.
:param      network_interface: EC2NetworkInterface instance
:type       network_interface: :class:`EC2NetworkInterface`
:param      node: Node instance
:type       node: :class:`Node`
:param      device_index: The interface device index
:type       device_index: ``int``
:return:    String representation of the attachment id.
This is required to detach the interface.
:rtype:     ``str``'

def ex_attach_network_interface_to_node(self, network_interface, node, device_index):

    params = {'Action': 'AttachNetworkInterface', 'NetworkInterfaceId': network_interface.id, 'InstanceId': node.id, 'DeviceIndex': device_index}
    response = self.connection.request(self.path, params=params).object
    attachment_id = findattr(element=response, xpath='attachmentId', namespace=NAMESPACE)
    return attachment_id
