After you have set up your account and created or selected your AMIs, you can now boot your instance. You can call the RunInstances API to start any number of on-demand instances. However, you will need to state how many instances you intend to start. In case you would like to start more than 20 On-Demand instances, you should complete the Amazon EC2 instance request form.
RunInstances will return success if Amazon EC2 fulfills your request. Using the DescribeInstance API call is a good way of checking the status of your instances. Moreover, you can use TerminateInstance API call to terminate any number of your instances programmatically. You can call the StopInstances API to release the compute resources while at the same time preserve the data on the boot partition. This is in case you have a running instance using an Amazon EBS boot partition. Understanding how Amazon EC2 works is very important when you need to benefit from it.