

# Gradual deployments

A gradual deployment ramps traffic to a new deployment in stages so you can watch for problems before it serves everyone. It limits the blast radius of a regression by exposing only a fraction of traffic to the new deployment during an observation window. Paired with it is [instant rollback](instant-rollback.md), a related capability that reverts an environment to its previous stable deployment in one step. Together they give you a slow, observable path forward and a fast path back.

## Configure a rollout strategy
<a name="_configure_a_rollout_strategy"></a>

Set an environment’s default rollout strategy with `aws amplifygen3 env edit --rollout`. You can set a gradual strategy on the `production` environment and on custom environments. The `preview` environment allows only `instant`.

```bash
aws amplifygen3 env edit --rollout <preset> --env production
```

Amplify offers two kinds of gradual rollout:
+  **Canary** presets (`canary-10pct-5m`, `canary-10pct-15m`, `canary-10pct-30m`) send 10 percent of traffic to the new deployment, hold it there for the window you choose (5, 15, or 30 minutes), and then shift to 100 percent.
+  **Linear** presets (`linear-10pct-1m`, `linear-10pct-3m`, `linear-10pct-10m`) increase the new deployment’s traffic by 10 percent at each interval (every 1, 3, or 10 minutes) until it reaches 100 percent.

The default strategy is `instant`, which moves all traffic to a new deployment in one step. To turn off gradual rollout and return to immediate deployment, set `--rollout instant`. These seven values are the full list of presets.

The output looks like the following:

```console
✓ Updated environment 'production' in app 'my-app'
  • rollout: canary-10pct-15m
```

If you set a gradual preset on the `preview` environment, the command fails with the following message:

```console
Gradual rollouts are not supported on the preview environment; 'preview' cannot set --rollout canary-10pct-5m.
```

Once a rollout strategy is set for your environment, deploy as usual. The deploy ramps gradually using the environment default:

```bash
aws amplifygen3 deploy --env production
```

 `aws amplifygen3 deploy` has no per-deploy strategy override. To ship an urgent hotfix without waiting for the canary schedule, do the following:

1. Switch the production environment to an instant rollout:

   ```bash
   aws amplifygen3 env edit --env production --rollout instant
   ```

1. Deploy the hotfix:

   ```bash
   aws amplifygen3 deploy --env production
   ```

1. Switch the environment back to your usual strategy. The following example restores a 30-minute canary:

   ```bash
   aws amplifygen3 env edit --env production --rollout canary-10pct-30m
   ```

## How a rollout starts
<a name="_how_a_rollout_starts"></a>

A gradual rollout starts when a new deployment succeeds on an environment that has a gradual strategy and automatic promotion turned on. Automatic promotion is on by default. It is the `--auto-promote` setting of `aws amplifygen3 env edit`, shown in `aws amplifygen3 env get` as `Web.EnvironmentAliasConfig.RoutingMode`, where `AUTO_ROUTE_TO_LATEST` means on and `MANUAL` means off.

Keep the following rules in mind when a rollout starts or is in progress:
+ If you turn off automatic promotion, a new deployment doesn’t serve the environment URL, and no rollout starts. A deployment that you promote with `aws amplifygen3 deployment promote` takes all traffic in one step. For more information about promoting a deployment, see [Promote a deployment](deploy-your-app-promote.md).
+ An environment runs one rollout at a time. A deployment that succeeds while a rollout is in progress gets no traffic until that rollout ends. Then the newest deployment that succeeded in the meantime starts its own rollout.
+ While a rollout is in progress, `aws amplifygen3 deployment promote` and `aws amplifygen3 rollback` fail with exit code 251. To change the deployment that serves traffic, stop the rollout first with `aws amplifygen3 deployment abort`, or wait for it to finish.
+ Branch and pull request preview URLs always move to their newest deployment in one step. Only the environment URL ramps.

When a rollout holds back the deployment that `aws amplifygen3 deploy` created, the output ends with the command that follows the rollout:

```console
Next:
  Wait for the result (traffic moves to it in stages, canary-10pct-15m):
    aws amplifygen3 deployment get --id k3x9w2q7mz --app my-app --env production --watch
```

## Observe a rollout in flight
<a name="_observe_a_rollout_in_flight"></a>

### Observe a rollout in the console
<a name="_observe_a_rollout_in_the_console"></a>

1. Sign in to the Amplify console.

1. Choose an app.

1. In the left navigation pane, choose **Deployments**.

1. Choose the active deployment. The rollout status shows the current stage, traffic split, and time until the next auto-advance.

### Observe a rollout using the CLI
<a name="_observe_a_rollout_using_the_cli"></a>

The following CLI command shows the rollout state for an environment. No deployment ID is needed.

```bash
aws amplifygen3 deployment get --env production
```

The rollout block reports the strategy, the current stage, the traffic split, the rollout status, the elapsed time since the rollout started, and the time until the next stage. The output looks like the following:

```console
Rollout
  Strategy:        canary-10pct-15m
  Canary:          k3x9w2q7mz
  Stable:          a1b2c3d4e5
  Stage:           1 of 2
  Traffic split:   canary: 10%  |  stable: 90%
  Status:          advancing
  Elapsed:         4m32s
  Next advance:    in 10m28s
  As of:           2026-11-20 18:00:00 UTC (pass --watch to follow)
```

The times are true when the command runs. To follow the rollout until it ends, add `--watch`.

## React to a rollout in flight
<a name="_react_to_a_rollout_in_flight"></a>

### React to a rollout in the console
<a name="_react_to_a_rollout_in_the_console"></a>

The console has no action that stops a rollout in progress. During a rollout, **Rollback** and promoting a deployment fail. To stop the rollout, use the CLI command in the next section.

### React to a rollout using the CLI
<a name="_react_to_a_rollout_using_the_cli"></a>

If the new deployment shows errors while it serves only part of the traffic, stop the rollout before it reaches everyone. The following CLI command stops a rollout that is in progress and sends all traffic back to the previous deployment. You choose the rollout by its environment, not by a deployment ID. The new deployment stays in the deployment history.

```bash
aws amplifygen3 deployment abort --env production
```

The output looks like the following:

```console
✓ Stopped rollout for environment 'production'; traffic reverted to the previous stable deployment.
```

The change reaches all viewers in about 5 to 10 seconds. Until then, some requests can still get the new deployment.

You can stop only a rollout that is in progress. If the rollout has finished, was already stopped, or already sends all traffic to the new deployment, the command changes nothing and fails with exit code 251. To return to the previous deployment after a rollout finishes, use [instant rollback](instant-rollback.md).