'Removes EFS instance by id/name'

def delete_file_system(self, name, file_system_id=None):

    result = False
    state = self.get_file_system_state(name, file_system_id)
    if (state in [self.STATE_CREATING, self.STATE_AVAILABLE]):
        wait_for((lambda : self.get_file_system_state(name)), self.STATE_AVAILABLE)
        if (not file_system_id):
            file_system_id = self.get_file_system_id(name)
        self.delete_mount_targets(file_system_id)
        self.connection.delete_file_system(FileSystemId=file_system_id)
        result = True
    if self.wait:
        wait_for((lambda : self.get_file_system_state(name)), self.STATE_DELETED, self.wait_timeout)
    return result
