We propose a supergravity inspired derivation of a Randall-Sundrum's typeaction as an effective description of the dynamics of a brane coupled to thebulk through gravity only. The cosmological constants in the bulk and on thebrane appear at the classical level when solving the equations of motiondescribing the bosonic sector of supergravities in ten and eleven dimensionscoupled to the brane. They are related to physical quantities like the braneelectric charge and thus inherit some of their physical properties. The mostappealing property is their quantization: in d_\perp extra dimensions,Lambda_brane goes like N and Lambda_bulk like N^{2/(2-d_perp)}. This dynamicalorigin also explains the apparent fine-tuning required in the Randall-Sundrumscenario. In our approach, the cosmological constants are derived parametersand cannot be chosen arbitrarily; instead they are determined by the underlyingLagrangian. Some of the branes we construct that support cosmological constantin the bulk have supersymmetric properties: D3-branes of type IIB superstringtheory provide an explicit example.