I am learning general relativity and at some point in the lecture notes it introduces the variational form of the equations of motion, i.e. minimise the action: $$S = \int_{A}^{B} d\tau = \frac{1}{c}\int_{A}^{B} \sqrt{-g_{\mu\nu} \frac{dx^\mu}{d\lambda} \frac{dx^\nu}{d\lambda}} d\lambda$$ where $\lambda$ is a parameter for the path in spacetime. The integrand is the Lagrangian. The notes then set $\lambda = \tau$. However if they do this then the Lagrangian is obviously just a constant ($c$ in fact). So any partial or total derivatives of the Lagrangian must be zero and the Euler-Lagrange equations become vacuous. So $\lambda = \tau$ seems like a bad choice. Are my notes wrong or am I missing something?
EDIT: some have said this question is a duplicate of this and this question. Unfortunately I do not see how my question is a duplicate. The fact that the integral is path dependent (addressed in the first link) is irrelevant. For example, consider an integral for the length of a path $\int_{\gamma} ds = \int_{\gamma} L(s) ds$. Obviously $L(s) = 1$ is not a good choice for the Lagrangian. The E-L equation would be vacuous. But this is precisely the situation when you set $\lambda = \tau$. The fact that the integral is path dependent doesn't change this. And I don't see how the second link is relevant at all.