TransUnion interview question

How do you terminate/spin up ec2 automatically?