Allocation Amazon EC2 resources using Algorithm