In the paradigm of effective field theory, one hierarchically obtains the effective action Aeff[q,⋯] for some low(er) energy degrees of freedom q, by integrating out the high(er) energy degrees of freedom ξ, in a path integral, based on an action A[q,ξ,⋯]. We show how one can integrate out a vector field va in an action A[Γ,v,⋯] and obtain an effective action Aeff[Γ,⋯] which, on variation with respect to the connection Γ, leads to the Einstein's field equations and a metric compatible with the connection. The derivation predicts a non-zero, positive, cosmological constant, which arises as an integration constant. The Euclidean action A[Γ,v,⋯], has an interpretation as the heat density of null surfaces, when translated into the Lorentzian spacetime. The vector field va can be interpreted as the Euclidean analogue of the microscopic degrees of freedom hosted by any null surface. Several implications of this approach are discussed.