created instances controller for managing ec2 instances