TransUnion Interview Question

How do you terminate/spin up ec2 automatically?