We provide a dynamic policy for the rapid containment of a contagion process modeled as an SIS epidemic on a bounded degree undirected graph with
nodes. We show that if the budget
of curing resources available at each time is
, where
is the CutWidth of the graph, and also of order
, then the expected time until the extinction of the epidemic is of order
, which is within a constant factor from optimal, as well as sublinear in the number of nodes. Furthermore, if the CutWidth increases only sublinearly with
, a sublinear expected time to extinction is possible with a sublinearly increasing budget
.