Cloud Servers

AWS Aurora PostgreSQL Now Branches Like Code — Every AI Agent Gets Its Own Copy of Production

10 min read

AWS Aurora PostgreSQL Now Branches Like Code — Every AI Agent Gets Its Own Copy of Production

The Short Answer

As of December 2, 2026, every developer, pull request, and AI coding agent on Amazon Aurora PostgreSQL can get its own isolated, writable copy of the production database — created in about a minute, billed only while it is awake, and deleted automatically when its time-to-live expires. AWS announced database branching for Aurora PostgreSQL in preview at re:Invent. Creating a branch costs nothing; running one is billed at the existing Aurora Serverless v2 rate — $0.12 per ACU-hour in US East (Ohio), verified December 3, 2026 in AWS’s Price List API. A typical pull-request branch costs roughly a quarter. A branch an agent forgets, held awake for the maximum 90 days, costs $129.60. That spread — 25 cents versus $130 — is the whole story. Branching solves the real bottleneck of agent-era development: ten agents cannot safely share one staging database. But it also makes production copyable by any sufficiently privileged role, so the order you adopt it in matters more than whether you adopt it.

It lands alongside AWS IAM for agents, still in preview and AWS Continuum’s agent security tooling: AWS is rebuilding the developer stack around software written, tested, and operated by agents working in parallel. A database branch is what a git branch is for code, applied to the one artifact that never had a branch button. Below: what shipped, what it costs, where the preview stops, and the security check to run first.

What AWS Actually Shipped (Verified December 3, 2026)

A database branch is an isolated copy of an Aurora PostgreSQL cluster that shares the parent’s storage pages and writes only the pages that change — copy-on-write, the same trick Aurora clones have used for years. The difference is everything around the copy. Each branch runs on its own Aurora Serverless compute (0 to 16 ACUs by default, up to 64 in half-ACU steps), gets its own endpoint, scales to zero when idle, and carries a mandatory time-to-live of 1 hour to 90 days that cannot be switched off; when it expires, Aurora deletes the branch. Manage branches from the Console, the CLI (aws rds create-branch), the SDKs, or the AWS MCP Server, which is how coding agents such as Kiro drive it. Amazon EventBridge can create a branch when a pull request opens and delete it when it closes — the integration that turns this from a console feature into a CI primitive.

AWS positions the feature for parallel agent work: every agent, task, or pull request gets its own branch so migrations validate against real production data and schema, in parallel, without queuing for shared staging. Anyone who has run two coding agents against one staging database knows the failure mode — agent A’s migration rewrites a table while agent B’s tests are mid-flight, and both report failures that are actually collisions. Branches remove the collision by giving each writer its own database, and catch the classic production accident early: a column change that rewrites a large table and blocks writes will do exactly that on a branch, where you can watch it, instead of at 2 a.m. on production.

Branches inherit the parent’s VPC placement, security groups, encryption, database users and roles, and masking policies — the feature’s best property and its sharpest edge, covered below. Per-branch metrics appear in CloudWatch Database Insights, so you can see what each branch consumed, which decides your bill.

What a Branch Costs: The Awake Time, Not the Copy

AWS says there is no additional charge for branching: you pay for branch serverless compute and data changed within the branch, at existing Aurora serverless rates. The Price List API confirms it — branch compute carries its own usage types (Aurora:BranchServerlessUsage and an I/O-Optimized twin) priced exactly at Serverless v2 rates. Rate card, read from AWS’s Price List API offer files (publication dated December 2, 2026) on December 3, 2026:

Region Branch compute, Standard (per ACU-hour) Branch compute, I/O-Optimized (per ACU-hour) Storage, Standard (per GB-month)
US East (Ohio) $0.12 $0.16 $0.10
Europe (Frankfurt) $0.14 $0.19 $0.119
Asia Pacific (Mumbai) $0.18 $0.24 $0.11

Worked example, assumptions stated plainly. One pull-request branch in Ohio: a migration holding 8 ACUs for 10 minutes, a test suite averaging 2 ACUs for 20 minutes, then auto-pause. About 2 ACU-hours, roughly $0.24; storage for a few gigabytes of changed pages over 24 hours is under a cent. Four hundred such branches a month cost about $98 in Ohio. For scale, a shared staging cluster never dropping below 2 ACUs costs $175.20 a month in Ohio for compute alone — so per-PR branches are cheaper than the staging cluster they replace, and every PR gets its own data.

The other number is the forgotten branch. Auto-pause only triggers after a period with no user-initiated connections (shortest idle interval: 300 seconds). A connection pool, a health check, or an agent session left open keeps the branch awake at, say, 0.5 ACU: $10.08 for a 7-day TTL in Ohio, $129.60 at the 90-day maximum, $6,480 for fifty — the per-cluster cap. At the default 16-ACU ceiling, an agent stuck in a retry loop burns $1.92 an hour, $46.08 a day. None of this argues against branches. It argues for setting the ceiling and TTL at create time (they cannot change afterwards in the preview), wiring deletion to the pull request, and filtering Cost Explorer on BranchServerlessUsage in week one. One open question: whether I/O requests on Standard configuration bill separately, as they do for ordinary clusters at $0.20 per million requests in Ohio. Until AWS says otherwise, check the first bill.

Where the Preview Stops

The constraint that settles most evaluations: the preview runs only on Aurora PostgreSQL 17 and higher, and only in US East (Ohio), Europe (Frankfurt), and Asia Pacific (Mumbai). US East (N. Virginia), where many production Aurora clusters live, is not on the list. A cluster on PostgreSQL 16, or in us-east-1, cannot be branched yet — for those teams the decision is whether the engine upgrade is worth doing now, a bigger conversation than a preview feature usually triggers.

The rest of the shape, from the Aurora User Guide’s limitations page as of December 3, 2026: up to 50 branches per cluster (10 on the AWS Free Tier) and 2,000 per account; one level of nesting; a required TTL of 1 hour to 90 days, with a child branch unable to outlive its source; settings fixed after creation during the preview; a single instance with no Multi-AZ, no automated backups, and no SLA — AWS is explicit that branches are for testing, not production workloads. Two more boundaries are easy to miss. You cannot merge a branch back into production: when a migration passes, you apply it the normal way, with Flyway or Alembic. And you cannot create an Aurora clone from a branch, though you can branch from a clone — a detail that matters for the security pattern below. Nor is a branch a load-testing tool: its serverless compute can differ from production’s, so timings will not match.

Aurora now has three ways to copy production. Branches are for many short, parallel test copies. Clones are long-lived clusters you configure yourself, for persistent QA and performance testing. Blue/Green Deployments stage a production change and switch traffic to it. Branching replaces neither; it fills the gap underneath — the disposable copy that lives for hours and dies on schedule.

The Security Check to Run Before Your First Branch

Settle this before anyone opens a pull request. Per the Aurora getting-started guide, roles with full Aurora access automatically gain the branching actions (rds:CreateBranch, rds:DeleteBranch, rds:DescribeBranches). On a PostgreSQL 17 cluster in a preview region, anyone holding that access — including CI roles and agent credentials with broad RDS permissions — can create a writable copy of production today. The feature is already on. The only question is whether your permissions know it.

Masking will not save you by default. A branch inherits production’s users, roles, and masking policies, and AWS says plainly that a branch does not hide private data on its own: an agent connecting as your admin role sees what that role sees. Note the version gap: branching needs PostgreSQL 17+, but the masking extension (pg_columnmask) needs 17.6+, so a cluster on 17.0–17.5 can be branched but cannot mask. The safe pattern, which AWS recommends: set masking on production first, give agents a dedicated non-admin database role, and use tag-based IAM so each agent connects only to branches carrying its own owner tag. If you cannot mask production yet, branch from a scrubbed clone. If none of that is in place, deny rds:CreateBranch in a service control policy until it is. Same lesson as EBS Adaptive Volumes’ pay-for-what-you-use pricing earlier this re:Invent: a small platform change silently redefines what your existing permissions and budgets mean.

Who Should Use This Now, and Who Should Wait

Teams running several coding agents against one shared staging database gain the most, because parallel agents fighting over one schema is exactly the problem branches eliminate. Teams with heavy pull-request pipelines and a history of migration surprises gain the second-most: a branch is the cheapest place to discover that your migration is slow. Teams on PostgreSQL 16 or earlier, only in us-east-1, or with synthetic test data can ignore the preview.

For everyone in between, the adoption order is the decision. First, find who can already branch: simulate rds:CreateBranch for every developer, CI, and agent role. Second, lock down the agent database role and put masking on PII columns (engine 17.6+). Third, turn branches on for CI with short TTLs (a day or less), MaxCapacity 4–8 ACUs instead of the default 16, and the shortest auto-pause interval. Fourth, wire cleanup to the pull request so the TTL is a backstop, not the plan, and raise client timeouts above 15 seconds (a paused branch takes about that long to resume). None of this is expensive — all of it is cheaper than discovering, via invoice or incident, that an agent held a copy of production awake for a quarter.

FAQ

How much does a branch cost?
Creating one is free. You pay for compute while it is awake — $0.12 per ACU-hour in Ohio (Standard), $0.14 in Frankfurt, $0.18 in Mumbai, verified in AWS’s Price List API on December 3, 2026 — plus storage for changed data. A typical PR branch costs about $0.24 in Ohio; one held awake at 0.5 ACU for 90 days costs $129.60.

Can I merge a branch back into production?
No. A branch is a disposable test copy. When a migration passes, you apply it to production through your normal pipeline (Flyway, Alembic, Liquibase).

Which versions and regions support it?
Aurora PostgreSQL 17+ in US East (Ohio), Europe (Frankfurt), and Asia Pacific (Mumbai), as of December 3, 2026. Aurora MySQL and US East (N. Virginia) are not included yet.

How long can a branch live?
1 hour to 90 days, and the TTL cannot be turned off. For a long-lived copy, use an Aurora clone — you can still branch from it.

Can I use a branch for load testing?
AWS advises against it: single serverless instance, no Multi-AZ, compute that can differ from production. Use a clone with production-matching instances.

Does branching expose production data to agents?
It can. Branches inherit production’s users, roles, and masking, so an agent connecting as an admin role sees what that role sees. Set up masking (PostgreSQL 17.6+) and a non-admin agent role first, or branch from a scrubbed clone.

The Bottom Line

Database branching is the first Aurora feature designed for a world where the writers of your schema are mostly not people. At roughly a quarter per pull request in Ohio, it undercuts the shared staging cluster it replaces and gives every agent real schema and data to fail against. The preview limits are narrow (PostgreSQL 17, three regions, no merge back, settings frozen at creation), and the cost trap is not the copy but the forgotten branch idling at half an ACU for 90 days. So the decision is not whether to try it, but the order: lock down who holds rds:CreateBranch and which role your agents use, then turn branches on for CI with short TTLs and low ceilings. On PostgreSQL 16 or in N. Virginia, plan the engine upgrade first. Either way, check your IAM roles this week — on eligible clusters, the ability to copy production already exists, and it arrived without asking.

Sources: AWS What’s New, “Announcing database branching for Amazon Aurora PostgreSQL (Preview)” (December 2, 2026); AWS Builder Center, “Introducing database branching for Amazon Aurora PostgreSQL” (December 2, 2026); Amazon Aurora User Guide branch pages, read December 3, 2026; AWS Price List API, Amazon RDS offer files (Ohio, Frankfurt, Mumbai), publication dated December 2, 2026, read December 3, 2026 — all rates. Worked examples are this article’s arithmetic from those rates, assumptions stated in the text.

Leave a Reply

Your email address will not be published. Required fields are marked *