Technology

    Aurora PostgreSQL Branches Let You Test Schema Changes

    J
    James
    December 3, 2026•5 min read
    Share:
    Aurora PostgreSQL Branches Let You Test Schema Changes
    Advertisement

    TL;DR

    AWS opened a preview of database branching for Aurora PostgreSQL at re:Invent on December 2. A pull request can get an isolated database with production-derived data and its own write endpoint, then let Aurora delete the branch when its time runs out. AWS launch announcement

    Read time: 4 min

    Aurora PostgreSQL gives schema tests a database per pull request

    A schema change can pass against a small fixture and still fail on a row nobody remembered to include. If two pull requests use the same staging database, the first one can also change what the second test sees. AWS used the December 2 Data & AI keynote to announce a way to give each migration test its own branch. Two reviews can start from the parent cluster and run against separate database states. AWS keynote coverage · How branches work

    Each branch initially shares the parent cluster's data pages. Aurora stores branch changes separately using copy-on-write, so setting up a test avoids a full physical copy of the parent database. The branch gets its own Aurora Serverless compute and a dedicated read/write endpoint. The test runner can connect there and execute migrations, add indexes or change rows. How branches work · Branch capabilities

    In practice, a team could create a branch for a pull request that adds a unique constraint, then use the branch to see whether existing rows violate it. A second pull request can test a backfill in parallel. Both teams can capture their own results and migration logs. Once a migration is approved, the production pipeline still has to apply it. AWS’s documentation describes that as a separate step. AWS CI/CD example

    Set the branch lifetime before the tests start

    Aurora requires a time-to-live of one hour to 90 days and deletes the branch when that period ends. During the preview, branch settings are fixed at creation. Pick a lifetime that covers the test suite and time to investigate a failure, and keep results in the CI system so reviewers can read them after Aurora reclaims the branch. Keep an eye on concurrency too. AWS documents up to 50 branches per cluster for customers outside the Free Tier, which has a limit of 10. Branch lifetime and quotas

    Advertisement

    Why This Matters

    AWS says it adds no separate branching fee. It bills the serverless compute a branch uses and the data that changes on the branch at existing Aurora Serverless rates. Idle branch compute scales to zero. For a team considering branches on every pull request, the bill will depend on how much work the tests do. A migration that rewrites a large table is worth measuring separately from a quick check that adds a nullable column. AWS preview pricing · Branch compute and storage

    The tricky part is data access. A branch inherits the parent cluster's database users, roles, dynamic masking policies and network settings. The isolation keeps test writes within the branch. Teams still need to verify what their CI account can read, especially when tests use production-derived records. A practical first check is to connect as the same role the pull request runner uses and verify that sensitive fields appear as expected. Branch connectivity and security

    One way to judge the preview is to run a migration that has failed before. If a team knows which legacy rows broke an earlier deployment, it can check that the new test catches the same failure and preserves the details a reviewer needs. Then it can decide whether to use Aurora PostgreSQL branches on every pull request or only on changes that touch the database. AWS CI/CD example

    • Start with one migration suite. Track the time from branch creation to the first query, then record how long the migration and test suite take. Compare those numbers with the time developers spend waiting on staging. AWS CI/CD example
    • Check which failure modes the suite covers. A branch has a single compute instance, with no read replicas or Multi-AZ failover. Use a production-like environment when testing performance or failover. Branch limits · AWS guide to choosing a test environment
    • Keep the production migration in the release pipeline. The rehearsal validates the script. The release pipeline still controls when it runs against the production database. See our coverage of AWS Amplify Gen 3 and database rollbacks for why those steps deserve separate review. AWS CI/CD example
    Advertisement

    Key Takeaways

    • Aurora PostgreSQL branching is in preview for version 17 and newer in Ohio, Frankfurt, and Mumbai. AWS launch announcement
    • Each test branch has its own write endpoint and expires on a timer. Save logs and test results before it expires. How branches work
    • Use branches to rehearse schema changes and backfills on realistic data. Plan separate checks for production performance and failover. AWS guide to choosing a test environment

    FAQ

    Can Aurora PostgreSQL branches write back to production?

    Writes on a branch stay on that branch. Aurora gives each branch its own read/write endpoint and uses copy-on-write storage to keep changes separate. Once the test passes, the deployment pipeline applies the reviewed migration to the production cluster as a separate release step. AWS CI/CD example

    Where can I use Aurora PostgreSQL database branching?

    The preview supports Aurora PostgreSQL 17 and newer in US East (Ohio), Europe (Frankfurt), and Asia Pacific (Mumbai). A branch runs on Aurora Serverless even if its parent uses provisioned instances. AWS requires each branch to have a lifetime between one hour and 90 days. Branch limits and availability

    Advertisement

    Sources

    1. 1. AWS announces database branching for Aurora PostgreSQL
    2. 2. AWS News Blog on Aurora’s re:Invent launches
    3. 3. Aurora documentation on how database branches work
    4. 4. Aurora database branch limits, quotas and availability
    5. 5. AWS guidance on branches, clones and Blue/Green Deployments

    Found an error or inaccuracy? Report it here and we'll review it promptly.

    J

    James

    Technology infrastructure and software engineering writer.