Effect of interfaces on mechanical properties of heterostructures