AWS is a suite of services. One of those is EC2, which is just virtual servers hosted by Amazon/AWS. A virtual server is no different than a physical server from the perspective of the guest operating system, regardless of if it is Linux or not. Linux is just the software running on the server, it has nothing to do with ownership. The only way "running on AWS" is problematic is if you tied yourself to their non-generic services like ECS or Beanstalk.
tl/dr: building on AWS and building on Linux are not mutually exclusive. One represents hardware the other software.