# atmos aws cloudformation changeset create

Create a changeset for later review and execution. Use
[`changeset execute`](/cli/commands/aws/cloudformation/changeset/execute) to
deploy the reviewed changes.

> ⚠️ Experimental

**CloudFormation Configuration**

Configure templates, parameters, and delivery targets for your component.
Configuration Reference[Read more](/stacks/components/aws-cloudformation)

## Usage

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

## Examples

```shell
atmos aws cloudformation changeset create vpc -s plat-ue2-dev
```

Create changesets for all or affected components in dependency order:

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

## Arguments

- **`component` (required unless selecting multiple components)**
  CloudFormation component name in the Atmos stack.

## Flags

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

## Behavior

Unlike a named changeset, the temporary preview created by
[`diff`](/cli/commands/aws/cloudformation/diff) or [`plan`](/cli/commands/aws/cloudformation/plan)
is deleted after rendering, along with any preview-created stack placeholder still
in `REVIEW_IN_PROGRESS`. Cleanup failures are returned as errors.

- A changeset that would change nothing is not kept. CloudFormation reports it as a `FAILED` changeset ("didn't contain changes"), so Atmos deletes it and prints `No changes; changeset not kept`.
- A changeset that fails to compute is deleted, together with the empty `REVIEW_IN_PROGRESS` stack it registered when Atmos created that stack for a never-deployed component.
- A successful changeset is kept, and so is the `REVIEW_IN_PROGRESS` stack of a never-deployed component: that is the reusable artifact you asked for, and [`changeset execute`](/cli/commands/aws/cloudformation/changeset/execute) needs it.
- A stack in `ROLLBACK_COMPLETE` cannot be updated, so `changeset create` fails with a hint to [`delete`](/cli/commands/aws/cloudformation/delete) the stack first.

## Output

On success, the summary includes the changeset's ID and name, whether it was a
no-op (no changes to apply), and the predicted changes — the same diff summary
[`diff`](/cli/commands/aws/cloudformation/diff) renders. Execute the named
changeset later with
[`changeset execute`](/cli/commands/aws/cloudformation/changeset/execute).

This command fires the `before.aws/cloudformation.changeset-create` and
`after.aws/cloudformation.changeset-create` [lifecycle hooks](/stacks/components/aws-cloudformation#lifecycle-hooks).
These events are separate from `apply`, so a hook listed only for
`before.aws/cloudformation.apply` does not run here.

To run an existing asset packaging hook before the changeset is created, add the
event to the hook's `events` list:

```yaml
hooks:
  package-lambda:
    events:
      - before.aws/cloudformation.apply
      - before.aws/cloudformation.changeset-create
```
