Trying to run few steps of CI/CD in a EC2 instance. Please don't ask for reasons.
Need to: 1) Start an instance using AWS CLI. Set few environment variables. 2) Run few bash commands. 3) Stream the command from the above commands into the console of the caller script. 4) If any of the commands fail, need to fail the calling script as well. 5) Terminate the instance.