While renting does typically cost more than owing, from a purely financial perspective, in practice you can argue that the difference is simply what you are paying the landlord for the services they are providing. The landlord is responsible for maintenance, taxes, insurance, and more. Not everybody wants to deal with those things. The landlord might be more efficient at those things too, especially in a rental apartment.
AWS might cost more but it provides a lot of benefits that are hard to assign a dollar value to.