By definition $M^{2}$ is an Einstein manifold if there exists $\lambda \in C^{\infty}(M)$ such that $$\mbox{Ric}(X,Y)=\lambda\langle X, Y \rangle$$ for all $X,Y \in \Gamma(TM)$.
My question is:
Is it true that $\lambda$ can be a constant function?
I am asking it, because it is very well known that the case $n \geq 3$ is true. And the case $n=2$, is it?
Thank you for your answer.