def filter_resources(resource, filter_name, filter_value):
        """Filter AWS resources

        Args:
            resource (object): EC2 resource
            filter_name (string): Filter name
            filter_value (string/list): Filter value(s)

        Returns:
            List: Filtered AWS resources
        """
        values = [filter_value]
        if type(filter_value) is list:
            values = filter_value

        filters = [{
            "Name": filter_name,
            "Values": values
        }]

        return list(resource.filter(Filters=filters))