You should take a look at Amplify (https://aws.amazon.com/amplify/), it will make the whole process considerably less painful, allow you to easily access AppSync (graphql) and Lambda with your code all in one place, then also trigger rebuilds on git commits.
A practical example that happened to my employer recently : we migrated to Microsoft Azure when they opened two datacenters in our country. We didn't have to change any code because we don't use vendor locked solutions.
Any time you want to leave that vendor. If they up their prices greatly, reduce service levels, refuse to give attention to improving service levels.. break a clause in the contract... an so on.
While this is true in theory, I don't recall a single instance of AWS increasing pricing or reducing service levels - not saying that is impossible, but it hasn't happened so far (at least that I remember)
I think hosting files in a S3 bucket with a CDN in front is easy to replace. You can do the same with two Docker containers or host it the same way in many other clouds.