# atmos aws cloudformation watch

Attach to a stack's operation and stream its events until the stack reaches
a terminal status — whether that operation is currently in progress,
already finished, or was started outside Atmos entirely (the AWS Console, a
CI pipeline running raw `aws cloudformation`, another teammate's terminal).
This is distinct from
[`apply`](/cli/commands/aws/cloudformation/apply)/[`deploy`](/cli/commands/aws/cloudformation/deploy)/[`delete`](/cli/commands/aws/cloudformation/delete)'s
automatic inline streaming, which only covers the operation that command
itself just started.

> ⚠️ Experimental

## Usage

```shell
atmos aws cloudformation watch <component> --stack <stack> [options]
```

```shell
atmos aws cloudformation watch vpc -s plat-ue2-dev
```

Watch all or affected components in dependency order:

```shell
atmos aws cloudformation watch --all -s plat-ue2-dev
atmos aws cloudformation watch --affected --base origin/main
```

## Flags

- **`--stack`, `-s` (required for a single component)**
  Atmos stack. With bulk selection flags, limits the selected components to this stack.

## Behavior

With bulk selection, `--stack` is an optional filter. Omit it to select components across stacks.

If the stack ends in a failed status, `watch` exits non-zero, the same
failure signal `apply`/`delete` give when the operation they started fails.

:::note
`watch` does not fire `before`/`after` hook events — only
[`apply`](/cli/commands/aws/cloudformation/apply),
[`diff`](/cli/commands/aws/cloudformation/diff),
[`delete`](/cli/commands/aws/cloudformation/delete),
[`drift detect`](/cli/commands/aws/cloudformation/drift/detect), and
[`drift describe`](/cli/commands/aws/cloudformation/drift/describe) do.
:::
