I've had three software engineer jobs, learned this lesson on the first one and watched others get tripped up by it in the other two. Nobody ever believes me when they say "We will just spin up a instance for every file in the directory" or similar and I respond with "No you won't, they aren't going to give you a thousand instances". This is a lesson that can only be learned first hand.
AWS regularly gives me a few hundred instances at a moments notice.
Sure, they’re given back just as quickly after the jobs are done, but it’s certainly not impossible.
It's basically an auction market. You set your max price to bid on instances, and will get them as long nobody else bids higher.
More details here:
https://aws.amazon.com/blogs/compute/new-amazon-ec2-spot-pri...
You set your max price, up to the on-demand price, and then you'll get your VM... or not. If you do get the VM, you still don't pay the full price in most circumstances unless demand is very high.