Hey - CodePipeline events can be monitored so that a failure could trigger an action. There is an existing pattern for custom triggers for AWS CodePipeline with AWS Lambda and Amazon CloudWatch Events.
As for your second question, you may also want to consider the costs of running a long-lived integration environment.
How to cleanup resources when a CodePipeline stage execution fails?asked 3 months ago
[CDK Pipeline] Best way to share parameters cross-stage (same account)?asked a year ago
Can i give custom input_artifact for codedeploy stage in codepipeline rather than using the stage output of codebuildasked 5 months ago
Aws CodePipeline to Deploy to ECS Cluster using AWS CLIasked 3 months ago
AWS Codepipeline is very slow(source to build stage)asked 4 years ago
CodePipeline Approval Stage Timeout Configurationasked 4 months ago
How to deploy frontend and backend in one CICD (CodePipeline)?Accepted Answerasked 7 days ago
CodePipeline - how to pass and consume multiple artifacts across CodeBuild Steps?asked 10 months ago
AWS CodePipeline custom stage to read config file and call external service endpointasked 6 months ago
read Pipeline source stage Output variables in BuildSpecAccepted Answerasked 9 months ago