  We prove a large deviations principle for the empirical measure of the one
dimensional symmetric simple exclusion process in contact with reservoirs. The
dynamics of the reservoirs is slowed down with respect to the dynamics of the
system, that is, the rate at which the system exchanges particles with the
boundary reservoirs is of order $n^{-\theta}$, where $n$ is number of sites in
the system, $\theta$ is a non negative parameter, and the system is taken in
the diffusive time scaling. Two regimes are studied here, the subcritical
$\theta\in(0,1)$ whose hydrodynamic equation is the heat equation with
Dirichlet boundary conditions and the supercritical $\theta\in(1,+\infty)$
whose hydrodynamic equation is the heat equation with Neumann boundary
conditions. In the subcritical case $\theta\in(0,1)$, the rate function that we
obtain matches the rate function corresponding to the case $\theta=0$ which was
derived on previous works (see \cite{blm,flm}), but the challenges we faced
here are much trickier. In the supercritical case $\theta\in(1,+\infty)$, the
rate function is equal to infinity outside the set of trajectories which
preserve the total mass, meaning that, despite the discrete system exchanges
particles with the reservoirs, this phenomena has super-exponentially small
probability in the diffusive scaling limit.
