Methods for estimating optimal treatment strategies typically assume unlimited access to resources. However, when a health system has resource constraints, such as limited funds, access to medication, or monitoring capabilities, medical decisions must account for competition between individuals in resource usage. The problem of incorporating resource constraints into optimal treatment strategies has been solved for point exposures (1), that is, treatment strategies entailing a decision at just one time point. However, attempts to directly generalize the point exposure solution to dynamic time-varying treatment strategies run into complications. We sidestep these complications by targeting the optimal strategy within a clinically defined subclass. Our approach is to employ dynamic marginal structural models to estimate (counterfactual) resource usage under the class of candidate treatment strategies and solve a constrained optimization problem to choose the optimal strategy for which expected resource usage is within acceptable limits. We apply this method to determine the optimal dynamic monitoring strategy for people living with HIV when resource limits on monitoring exist using observational data from the HIV-CAUSAL Collaboration.