There is no reason why you couldn’t do that! we’ve even open-sourced a bunch of our components to help people do it - https://github.com/moltin
The reason we created Moltin was to speed up this process, bring it up to modern standards, and give developers the creative freedom to use the tools they’re comfortable with. By not going down the self-hosting route you also no longer have to manage the installation, keep the codebase secure or worry about scaling.
Our main stack utilises nginx, php, postgres, redis and a few other things in-between, we’re built on top of AWS purely for the flexibility it gives us.