# atmos aws cloudformation logs

Show the combined CloudFormation event log across a stack and every nested
stack beneath it (up to 10 levels deep), merged into a single chronological
timeline — instead of having to check each nested stack's events separately.

> ⚠️ Experimental

## Usage

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

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

Render a per-resource timeline instead of a flat chronological list:

```shell
atmos aws cloudformation logs vpc -s plat-ue2-dev --chart
```

Show logs for all or affected components in dependency order:

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

## Flags

- **`--stack`, `-s` (required for a single component)**
  Atmos stack. With 
  `--all`
  , 
  `--affected`
  , 
  `--tags`
  , or 
  `--labels`
  , this is an optional stack filter; omit it to select components across stacks.
- **`--chart` (optional)**
  Render a per-resource timeline (one line per logical resource ID, showing its status transitions in order) instead of a flat chronological event list.
- **`--follow`, `-f` (optional)**
  Continuously stream new events until interrupted (
  `tail -f`
   style) instead of returning after one pass. Press Ctrl+C to stop; the command exits 130. Cannot be combined with 
  `--chart`
  .

## Output

By default, every event from the stack and its nested stacks is printed in
timestamp order, the same as a single stack's event stream. With `--chart`,
events are grouped by logical resource ID instead, one line per resource
showing its status transitions in order:

```
NatGateway                    CREATE_IN_PROGRESS -> CREATE_COMPLETE
SubnetsStack                  CREATE_IN_PROGRESS -> CREATE_COMPLETE
```

With nested stacks, each row is prefixed with its stack name (`<stack-name>/<LogicalId>`). A stack ARN
appears only when two different stacks share a name, for example a stack that was deleted and re-created,
where the name alone would merge their rows.

:::note
`logs` 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.
:::
