The vendor lock in from AWS doesn’t come from just using EC2 servers. EC2 is just linux servers, like you say. You could run them anywhere. In fact, if you’re just running AWS EC2 servers without leveraging their other features, particularly auto-scaling, you’re probably just setting money on fire. Everything EC2 offers can be done much cheaper at a different host.
The AWS lock-in comes when you expand to their other services. Route 53 DNS, Relational Database Service, Simple Email Service, etc etc. AWS offers a ton of different services that are quite useful, and they add new ones all the time. And if your company uses a bunch of them, and then realizes they need to leave AWS, doing so is incredibly painful. Which is the point.
My point is that, if someone really leverages the power of AWS, it is entwined into their software stack to such an extent that it is not just a service anymore. It’s a platform. It’s the glue that keeps everything together. The lines between service and proprietary software blur real quick. It’s one of the reasons for the AGPL.
Everything in development involves risk, and products will move real slow if you don’t depend on someone for some services. But developers aren’t very good at risk management, not being reliant on a single service to butter your bread. It is very quick to bring a minimum value product to market on AWS, but the followup to that MVP needs to be moving to a more sustainable, less risky infrastructure.