That’s the relatively easy part. There’s also a lock-in with all the integrations as you probably need to have some sort of persistent storage and all the other managed services helping to cope with the complete statelessness.
Nobody prevents you to write your serverless function so it needs a block store of a certain size or ingress at a certain port.