CodePipeline / Client / retry_stage_execution



You can retry a stage that has failed without having to run a pipeline again from the beginning. You do this by either retrying the failed actions in a stage or by retrying all actions in the stage starting from the first action in the stage. When you retry the failed actions in a stage, all actions that are still in progress continue working, and failed actions are triggered again. When you retry a failed stage from the first action in the stage, the stage cannot have any actions in progress. Before a stage can be retried, it must either have all actions failed or some actions failed and some succeeded.

See also: AWS API Documentation

Request Syntax

response = client.retry_stage_execution(
  • pipelineName (string) –


    The name of the pipeline that contains the failed stage.

  • stageName (string) –


    The name of the failed stage to be retried.

  • pipelineExecutionId (string) –


    The ID of the pipeline execution in the failed stage to be retried. Use the GetPipelineState action to retrieve the current pipelineExecutionId of the failed stage

  • retryMode (string) –


    The scope of the retry attempt.

Return type:



Response Syntax

    'pipelineExecutionId': 'string'

Response Structure

  • (dict) –

    Represents the output of a RetryStageExecution action.

    • pipelineExecutionId (string) –

      The ID of the current workflow execution in the failed stage.


  • CodePipeline.Client.exceptions.ValidationException

  • CodePipeline.Client.exceptions.ConflictException

  • CodePipeline.Client.exceptions.PipelineNotFoundException

  • CodePipeline.Client.exceptions.StageNotFoundException

  • CodePipeline.Client.exceptions.StageNotRetryableException

  • CodePipeline.Client.exceptions.NotLatestPipelineExecutionException