Megathrust earthquakes are strongly influenced by the elastic properties of rocks surrounding the fault. In contrast to friction, these properties can be derived in situ from geophysical measurements along the seismogenic zone. However, they are often overestimated in numerical simulations, particularly in the shallow megathrust. Here we explore the influence that realistic depth-varying upper-plate elastic properties along the megathrust have on earthquake rupture dynamics and tsunamigenesis using 3D dynamic rupture and tsunami simulations. We compare results from three subduction zone scenarios with homogeneous and heterogeneous elastic media, and bimaterial fault. Elastic properties in the heterogeneous model follow a realistic depth-distribution derived from controlled-source tomography models of subduction zones. We assume the same friction properties for all scenarios. Simulations in the heterogeneous and homogeneous models show that rigidity depth variations explain the depth-varying behavior of slip, slip rate, frequency content, and rupture time. The depth-varying behavior of slip, frequency content, and rupture duration quantitatively agree with previous predictions based on worldwide data compilations, explaining the main depth-dependent traits of tsunami earthquakes and large shallow megathrust earthquakes. Large slip, slow rupture and slip rate amplification in bimaterial simulations are largely controlled by elastic rock properties of the most compliant side of the fault, which in subduction zones is the upper plate. Large shallow slip and trenchward increasing upper-plate compliance of the heterogeneous model lead to the largest co-seismic seafloor deformation and tsunami amplitude. This highlights the importance of considering realistic upper-plate rigidity variations to properly assess the tsunamigenic potential of megathrust earthquakes.