> ## Documentation Index
> Fetch the complete documentation index at: https://synthetiq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Deployment infrastructure (BYOI)

> Register and read the AWS accounts an organization deploys into

For [Bring Your Own Infrastructure](/docs/platform-docs/deployments/byoi/overview), each organization has one or more **deployment targets** — AWS accounts it deploys apps into. `synthetiq infra provision` registers a target here after provisioning the account; deploys resolve an app's target to know which account, role, and domain to use.

An organization can hold multiple targets (e.g. a shared target plus a dedicated BYOI one); one is the default. Each production app pins to a target.

**Node SDK:** `sdk.awsConfig.*`. See [Node SDK](/docs/platform-docs/platform-api/node-sdk).

## List deployment targets

```bash theme={null}
GET /api/organizations/{id}/aws-config
```

Returns the organization's deployment targets:

```json theme={null}
{ "configs": [ { "aws_account_id": "…", "domain": "…", "status": "ready", "is_default": true, "…": "…" } ] }
```

**Authentication:** Organization member.

## Register / update a deployment target

```bash theme={null}
PUT /api/organizations/{id}/aws-config
```

Upserts a target keyed on `(organization, aws_account_id)`. Called by `synthetiq infra provision` once the AWS account is provisioned. Only the deploy key **hash** is sent — the raw key never leaves the customer account.

| Parameter             | Type | Description                                              |
| --------------------- | ---- | -------------------------------------------------------- |
| `aws_account_id`      | body | Target AWS account id                                    |
| `deploy_role_arn`     | body | Role the deploy pipeline assumes                         |
| `deploy_api_key_hash` | body | Hash of the in-account deploy key                        |
| `domain`              | body | Base domain for apps (e.g. `apps.acme.com`)              |
| `cert_arn`            | body | CloudFront (CDN) ACM certificate ARN                     |
| `api_cert_arn`        | body | ALB (API) ACM certificate ARN                            |
| `db_flavor`           | body | Database flavor for new apps (e.g. `aws-serverless-rds`) |
| `provision_config`    | body | Snapshot of the `synthetiq.yaml` used, for audit         |
| `status`              | body | `ready` once all required fields are present             |

A target becomes the org default when it first reaches `ready` and no default exists.

**Authentication:** Organization member + `infra:provision` scope (token: `platform:infra:write`).

## See also

* CLI: [`synthetiq infra`](/docs/platform-docs/cli/infra) (`init`, `generate`, `provision`, `status`)
* [BYOI overview](/docs/platform-docs/deployments/byoi/overview) and [Prerequisites](/docs/platform-docs/deployments/byoi/prerequisites)
