We study the black hole's shadow for Schwarzschild-de Sitter and Kerr-de Sitter metrics with the contribution of the cosmological constant Λ. Based on the reported parameters of the M87* black hole shadow, we obtain constraints for the Λ and show the agreement with the cosmological data. It is shown that the coupling of the Λ-term with the spin parameter reveals peculiarities for the photon spheres and hence for the shadows. Within the parametrized post-Newtonian formalism, the constraint for the corresponding Λ-determined parameter is obtained.