AWS Certified DevOps Engineer – ProfessionalIncident and Event ResponseMedium

A software development company uses AWS CodePipeline for its CI/CD workflows. They have a requirement to automatically roll back a failed deployment to the previously successful version if any stage in the pipeline fails. The solution must be integrated with CodePipeline and minimize manual intervention. Which feature of AWS CodePipeline should be configured?

  1. ACodePipeline's automatic rollback on failure.
  2. BAWS Step Functions to orchestrate a rollback workflow.
  3. CAWS CloudFormation Change Sets to preview and manually execute rollbacks.
  4. DAmazon EventBridge rules to detect pipeline failures and trigger a Lambda rollback.
Show answer & explanation

Correct answer: A. CodePipeline's automatic rollback on failure.

AWS CodePipeline offers a direct feature for automatic rollback on deployment failures. By enabling this setting, CodePipeline will automatically redeploy the last successful revision of the application if a subsequent deployment fails, ensuring quick recovery and minimizing manual intervention.

Why the other options are wrong

  • B. While Step Functions *could* orchestrate a rollback, CodePipeline's native feature is simpler, more integrated, and requires less custom development for this specific use case.
  • C. CloudFormation Change Sets are for previewing infrastructure changes and require manual execution, which contradicts the 'automatically roll back' and 'minimize manual intervention' requirements.
  • D. EventBridge and Lambda could trigger a custom rollback, but again, CodePipeline's native feature is more direct and less complex for pipeline-level rollbacks.

CodePipeline Automatic Rollback

AWS CodePipeline can be configured to automatically roll back to the last successfully deployed application version if a subsequent deployment fails, ensuring application stability and quick recovery.

  • Built-in feature for deployment stability.
  • Redeploys the last successful revision.
  • Minimizes manual intervention during failures.

Memory trick: Pipeline fails, don't you dread, automatic rollback, success instead.

More Incident and Event Response questions