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

# A self-service database

> An AWS infrastructure pattern, deployed with formae.

Instead of a fixed forma, expose a parameterized database that developers deploy
with a few flags. This is the platform-engineering pattern: you write one forma
that maps a small vocabulary (a team, an environment, a size) to a
production-ready RDS instance with your standards baked in (encryption, multi-AZ,
deletion protection), and developers run `formae apply --mode reconcile --team
payments --env staging`.

```mermaid theme={"languages":{"custom":["/languages/pkl.json"]}}
flowchart LR
  target["aws-target"]:::tgt

  subgraph stack["team-env"]
    direction LR
    vpc["VPC"]:::res
    subnets["Private subnets"]:::res
    subnetGroup["DB subnet group"]:::res
    sg["Database security group"]:::res
    db["RDS instance"]:::res

    vpc --> subnets
    subnets --> subnetGroup
    vpc --> sg
    subnetGroup --> db
    sg --> db
  end

  target --> stack

  classDef tgt fill:#FF8201,stroke:#B25900,color:#ffffff
  classDef res fill:#FFF3E6,stroke:#FF8201,color:#02024B
  style stack fill:#ffffff,stroke:#02024B,stroke-width:2px,stroke-dasharray:6 4,color:#02024B
```

**Deploy.** A developer supplies the flags and applies; reconcile brings their
stack into being exactly as the forma and their choices describe it:

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae apply --mode reconcile --team payments --env staging team-database.pkl
```

The forma, the property interface, and the standards it enforces are covered in
[Build self-service infrastructure](/documentation/guides/build-self-service-infrastructure).
