Varieties of small degree with respect to codimension and ample vector bundles