🔥 3-day streak
AWS Certified DevOps Engineer - Professional94 / 204
Question 94 of 204
A team runs a CodePipeline with a Source stage (CodeCommit), a Build stage (CodeBuild), and a Test stage. The Test stage provisions a full ephemeral test environment using a CloudFormation stack, runs end-to-end tests against it, and must then destroy the environment regardless of test outcome to avoid ongoing charges. Currently they use a single CodeBuild action whose buildspec creates the stack, runs tests, and deletes the stack in the same phase. When tests fail, the build exits immediately and the CloudFormation stack is left running, accumulating cost. Which change most reliably ensures the environment is always torn down?
Reviewed for accuracy · Report an issueNext question