How does elastic cloud hosts such as Amazon work, technically?

What should a programmer do when designing an application in order for it to be scalable in elastic cloud environments such as Amazon? Specifically, if a program scales by spawning more processes, is that enough to guarantee Amazon will be able to split them horizontally?