A general answer to that question is quite difficult. I can make a few general comments, but it would help if we could discuss some more concrete cases.
Some general comments:
Whatever is your final platform, you should be able to at least run part of your code independently of the platform. So, even if you end up on the cloud, you should be able to run part (if not all) of your code locally. Maybe not with a full production dataset, but with enough to do testing.
I would advise, in as much as possible, to steer clear of very proprietary cloud technologies. So you will have to use proprietary compute (e.g. EC2 on Amazon), sure and probably proprietary storage (e.g. S3 on Amazon), but think carefully before tying yourself to less common services. For example: do you really need DynamoDB (a large-scale key-storage DB on AWS) or can you survive with just S3 or RDS? if you really require a key store maybe something non-proprietary?
If you end up with a solution that is agnostic as possible against the computing and storage platform - then you end up with more flexibility in the future to change your decision.
For example, If you need a lot of parallel processes, its not very hard to abstract away the parallel infrastructure in a library that gives you flexibility in the future.
So: Try to make your software architecture to be - inasmuch as possible - independent from a platform (making the question moot). Make sure your development is nimble, allowing you to work locally. If you really really end up depending on a lot of proprietary technologies from a vendor, consider something like localstack https://github.com/localstack/localstack
Again: its not easy to come with very general guidelines. But if you have a more concrete example I can comment a bit more in depth