# How to approve a CodePipeline manual approval

How-to guides · Updated 16 November 2026

**Short answer:** In the CodePipeline console, open the pipeline, choose Review on the waiting approval action, add a comment and choose Approve or Reject. From the CLI, get the approval token with aws codepipeline get-pipeline-state, then call aws codepipeline put-approval-result with status=Approved. An approval that nobody answers fails the stage after seven days.

## Console steps

1. Open the CodePipeline console and select the pipeline. The approval stage shows the action as waiting.
2. Choose **Review** on the approval action. If the pipeline author added a URL to review (for example a staging site or a change set), open it first.
3. Enter a comment explaining the decision, then choose **Approve** or **Reject** and submit.

Approving lets the execution continue to the next stage. Rejecting fails the stage; the execution stops there, and you can later retry the stage to get a fresh approval request.

## CLI steps

```
# 1. Get the token for the waiting approval (stage "Approval", action "ManualApproval")
TOKEN=$(aws codepipeline get-pipeline-state --name my-pipeline \
  --query "stageStates[?stageName=='Approval'].actionStates[?actionName=='ManualApproval'][].latestExecution.token" \
  --output text)

# 2. Approve (or use status=Rejected)
aws codepipeline put-approval-result \
  --pipeline-name my-pipeline \
  --stage-name Approval \
  --action-name ManualApproval \
  --result summary="Staging checks passed, approved by alex",status=Approved \
  --token "$TOKEN"
```

The response includes `approvedAt`. Stage and action names are case-sensitive and must match the pipeline definition; `aws codepipeline get-pipeline --name my-pipeline` shows them.

## Permissions

The approver needs `codepipeline:PutApprovalResult` on the action, plus read access to see the pipeline. The resource ARN goes down to the action, so you can let one group approve production only:

```
{
  "Version": "2012-10-17",
  "Statement": [
    { "Effect": "Allow", "Action": ["codepipeline:GetPipeline", "codepipeline:GetPipelineState", "codepipeline:ListPipelines"], "Resource": "*" },
    { "Effect": "Allow", "Action": "codepipeline:PutApprovalResult",
      "Resource": "arn:aws:codepipeline:eu-west-2:123456789012:my-pipeline/Approval/ManualApproval" }
  ]
}
```

## Before you approve

- **Check what you're approving.** The execution's source revision (commit ID) is visible in the pipeline view and in `aws codepipeline list-pipeline-executions --pipeline-name my-pipeline`. Make sure it's the change you reviewed, not a newer one that arrived meanwhile.
- **Check earlier stages passed** as expected: tests, security scans and the staging deploy.
- **Leave a real comment.** The summary is recorded with the approval and in CloudTrail, which is your audit trail for who let the change through.

Every decision is recorded in CloudTrail as a `PutApprovalResult` event, which answers "who let this release through?" later. If your team discusses approvals in chat, connect the approval action's SNS topic to a chat channel; people still approve in the console or CLI, so the IAM policy above remains the control.

## Errors you may hit

| Error | Meaning |
|---|---|
| `InvalidApprovalTokenException` | The token is stale: the approval already got a response, expired, or a newer execution superseded it. Fetch the token again. |
| `ApprovalAlreadyCompletedException` | Someone else approved or rejected it first |
| `ActionNotFoundException` / `StageNotFoundException` | Name mismatch, often case |
| `AccessDeniedException` | Your policy doesn't cover that action ARN |

To be told when an approval is waiting, configure an SNS topic on the approval action; reviewers get an email (or chat message) with a link.

## Questions

### How long does a CodePipeline manual approval wait?

Seven days. If nobody approves or rejects it within that time, the action fails and the stage fails with it.

### Can I approve a CodePipeline from the command line?

Yes. Get the token from aws codepipeline get-pipeline-state and pass it to aws codepipeline put-approval-result with status=Approved and a summary.

### What happens when I reject an approval?

The approval action and its stage fail and the execution stops. Retrying the stage creates a new approval request.

## When this happens away from your desk

Approvals tend to arrive when the approver is away from their desk. CloudConsole, a phone app for AWS, is built to show pipeline state on your phone, with production guardrails around anything that changes it.

[About the CloudConsole app](https://cloudconsole.dev/aws-console-app) · [Download on the App Store](https://apps.apple.com/app/cloudconsole-for-aws/id6835419710)

## Sources

- [Add a manual approval action to a stage](https://docs.aws.amazon.com/codepipeline/latest/userguide/approvals.html)
- [PutApprovalResult API reference](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PutApprovalResult.html)

## Related

- [aws codepipeline put-approval-result](https://cloudconsole.dev/cli/codepipeline-put-approval-result)
- [aws codepipeline get-pipeline-state](https://cloudconsole.dev/cli/codepipeline-get-pipeline-state)
- [How to retry a failed CodePipeline stage](https://cloudconsole.dev/how-to/retry-failed-codepipeline-stage)
- [aws codepipeline start-pipeline-execution](https://cloudconsole.dev/cli/codepipeline-start-pipeline-execution)
- [How to get CloudWatch alarm email notifications](https://cloudconsole.dev/how-to/cloudwatch-alarm-email-notification)
- [How to add my IP to an AWS security group](https://cloudconsole.dev/how-to/add-my-ip-to-security-group)

---

Source: https://cloudconsole.dev/how-to/approve-codepipeline-manual-approval

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
