Skip to content

Aurora PostgreSQL cloning: does the 15 copy-on-write clone limit apply per cluster or per shared storage volume, including clones of clones?

0

We are designing a cloning service for Aurora PostgreSQL that creates many short-lived clones for engineering teams. The Aurora cloning documentation says:

You can create up to 15 clones with the copy-on-write protocol, and the next clone is a full copy. You can create multiple clones from another clone.

The documentation doesn’t say how these two rules interact. Could you please confirm:

Is the limit of 15 counted per source cluster, or across all clusters that share the same underlying storage (the original cluster and all clones of it, directly or indirectly)? Suppose cluster A has a clone B. Does creating 15 clones of B count toward A’s 15, or does B have its own 15? Is there a limit on how deep clone-of-clone chains can go? When a clone is a full copy, how long does it take relative to a copy-on-write clone? Does it depend on the volume’s data size? If a source cluster is deleted, do its clones keep their copy-on-write status, or do they affect the count?

Context: Engine: Aurora PostgreSQL (version 17.x), Region: US, source volume size: 8 TB. We plan about 30+ concurrent clones, created from a masked golden copy that is itself a clone of production.

asked a month ago118 views

2 Answers
0

The 15 copy-on-write clone limit applies across all clusters that share the same underlying storage volume, not per individual cluster. This means the limit is cumulative across the original cluster and all of its clones, whether direct or indirect.

To address your specific questions:

  1. The limit is counted across all clusters sharing the same storage. If you have cluster A and create clone B from it, then create clones from B, all of these count toward the same pool of 15 copy-on-write clones for that shared storage volume.

  2. If cluster A has clone B, and you create 15 clones of B, those clones count toward the shared limit. The original cluster and its clone are considered the same for purposes of enforcing the copy-on-write limit. Clone B does not have its own separate allocation of 15 clones.

  3. There is no explicit limit mentioned on the depth of clone-of-clone chains, but all clones in the chain share the same 15 copy-on-write limit for that storage volume.

  4. When you exceed 15 clones and trigger a full copy, it acts like a point-in-time recovery operation. The documentation does not provide specific timing comparisons, but full copies would logically take longer than copy-on-write clones and would depend on the data size, as the entire dataset needs to be copied rather than using the space-efficient copy-on-write protocol.

  5. When you delete the source cluster volume, the data in clone volumes remains unchanged. Aurora redistributes the storage billing for pages that were owned by the deleted cluster among the remaining clones that share those pages. The clones continue to function normally.

For your use case with 30+ concurrent clones from a masked golden copy (which is itself a clone of production), you would exceed the 15 copy-on-write limit. After the 15th clone, subsequent clones would be full copies, which would be slower to create and require significantly more storage for your 8 TB volume. You may need to architect your solution differently, such as creating multiple independent golden copies or using a different approach to manage your clone lifecycle.
Sources
Cloning a volume for an Amazon Aurora DB cluster - Amazon Aurora
Cross-account cloning with AWS RAM and Amazon Aurora - Amazon Aurora

answered a month ago

EXPERT

reviewed a month ago

0

The Aurora cloning documentation doesn't answer most of these questions, so I'll separate what's documented from what you'd need to confirm by testing or with AWS.

What the documentation says

  • The rules are only stated separately: up to 15 copy-on-write clones, after which the next clone is a full copy that works like point-in-time recovery. You can also create clones of clones. It doesn't say whether the 15 is counted per source cluster or across everything sharing the storage, whether there's a depth limit for clone-of-clone chains, or whether deleting a clone frees a slot.
  • No timing is published for full-copy clones. Because the docs compare a full copy to point-in-time recovery, expect it to take roughly as long as a PITR, which depends on data size. For 8 TB, that's likely hours, compared with minutes for a copy-on-write clone. That's an estimate, not a documented figure.
  • Deleting the source: the clones' data isn't affected. Aurora keeps the pages the deleted source owned and redistributes their storage billing among the clones still sharing them. This can make VolumeBytesUsed on each clone go up or down. The docs don't say whether this affects the 15-clone count.

How to find out for your setup

You can tell which kind of clone you got:

  • Copy-on-write clone: created in minutes, and VolumeBytesUsed starts small and grows only as data changes.
  • Full copy: takes much longer, and VolumeBytesUsed starts at roughly the full volume size.

Run a test with a small test volume, then repeat the relevant step at full scale:

  1. Make 15 clones of A, then 1 more. Confirm the 16th is a full copy.
  2. Make 15 clones of clone B. Check whether those count toward A's 15.
  3. Delete some clones and make new ones. Check whether slots are freed.
  4. Delete the source and clone again.

Then ask AWS Support to confirm the results officially. If you're building a service around this, that's worth doing.

Design suggestions for 30+ concurrent clones

Fan out from several independent masked roots. Make 2–3 independent copies of the masked golden image. A full copy or a snapshot restore creates a new storage volume with no shared pages, so each copy works no matter how the 15-clone limit is counted. Then spread team clones across these roots, at most 15 per root. This works whichever way the limit is counted. The trade-off is that each root pays for its full ~8 TB of storage, while the team clones stay cheap.

Keep the masking pipeline separate from the clone tree. Clone production, mask it, then create the golden roots from that masked copy. That way, team clones never share pages with production.

Raise the DB cluster quota. The default is 40 DB clusters per region. Production, golden roots, and 30+ clones will reach that, so request an increase.

Delete clones automatically. Use a TTL, such as a tag plus a scheduled Lambda, so short-lived clones don't build up storage changes or use up the cluster quota.

Plan refreshes. Clones from a golden root are fixed at the point they were cloned. To refresh the data, create new roots and recreate the clones from them, rather than continuing to clone from aging roots.

Sources:

EXPERT

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.