# CloudFormation Configuration

:::caution Unreleased CloudFormation support
This documentation previews the implementation in [PR #3157](https://github.com/cloudposse/atmos/pull/3157).
The documentation-only revision does not register `atmos aws cloudformation` or its `cfn` alias.
Use a build containing that implementation before running these examples.
:::

Tell Atmos where native `aws/cloudformation` component files live. This
project-wide setting keeps stack files focused on what to deploy, while
`atmos.yaml` defines where CloudFormation components are found. Stacks are
deployed directly through the AWS SDK for Go v2, so no `aws` CLI or
`cfn`/`sam`/`Rain` binary is required.

> ⚠️ Experimental

## Configuration

**File:** `atmos.yaml`

```yaml
components:
  "aws/cloudformation":
    # Base path to native aws/cloudformation component directories (where local
    # templates live). Defaults to components/cloudformation.
    base_path: components/cloudformation
```

The `aws/cloudformation` key can be quoted in YAML for readability; quoting is
not required, since `/` is not a YAML special character.

## Configuration Reference

- **`base_path`**

  Base directory for native `aws/cloudformation` components. A component's
  `template:` (and, when set, `stack_policy.file:`) resolve relative to its
  component directory under this base path. Defaults to
  components/cloudformation.

Component-level fields — `template`, `stack_name`, `parameters`, `capabilities`,
`tags`, `stack_policy`, `role_arn`, `notification_arns`, `disable_rollback`,
`termination_protection`, `timeout_in_minutes`, `source`, `provision`, `auth`,
and `dependencies` — are configured per stack, not in `atmos.yaml`. See
[CloudFormation stack configuration](/stacks/components/aws-cloudformation).

## Region Resolution

CloudFormation API calls need an AWS region. Atmos resolves it in this order,
most specific wins:

1. `settings.aws_cloudformation.region` on the component
2. The active identity's region
3. The AWS SDK's default credential/region chain (`AWS_REGION`, shared config)

```yaml
components:
  "aws/cloudformation":
    vpc:
      settings:
        aws_cloudformation:
          region: us-west-2
      # ...
```

There is no per-component account override outside stack sets — the account is
always the active identity's account.

See the [upcoming `atmos aws cloudformation` implementation](https://github.com/cloudposse/atmos/pull/3157)
and the
[CloudFormation stack configuration](/stacks/components/aws-cloudformation) for
component-level fields.
