You aren't necessarily locked in AWS just by using it. Less and less so in fact, with the advent of Kubernetes. Even before that, a "classical" app with an autoscaling group or two, load balancer, and managed database aren't something that will take an enormous amount of time to move to another provider. Basically the main complexity would be transferring the data and the cutover, but you get that regardless of provider.