How to copy a production database to dev without the sensitive data
Mask a snapshot in the production account first, then share only the masked copy with the dev account. Unmasked data never leaves the production account, and nobody in dev needs access to production.
What happens in each account
Source account (production)
-
Snapshot
The latest snapshot is copied.
-
Check schema
The run stops if there are new columns.
-
Mask
Washery applies the policy you approved.
-
Verify
The run stops if the check finds sensitive data.
Destination account (dev or test)
Masked copy
A snapshot, a database or backup files in your dev or test account.
Why not copy the snapshot to dev and mask it there?
If you copy the snapshot first, the unmasked data is in the dev account, and everyone who can restore a snapshot in that account can read it. Mask the data in the production account, so that only masked data reaches dev.
What has to be set up between the two accounts?
Amazon RDS lets you share a snapshot with another AWS account. Three rules apply:
- A snapshot encrypted with the default
aws/rdskey cannot be shared. The masked snapshot has to be copied with a customer managed key that the dev account is allowed to use. - The dev account copies the shared snapshot with a key that belongs to it, and restores from that copy.
- SQL Server and Oracle snapshots encrypted with Transparent Data Encryption cannot be shared.
The four ways a masked copy can appear in dev
How the masked copy appears in dev depends on what your team does with it.
- Shared snapshot. A masked snapshot is shared with your dev or test account. Restore it for a branch, a bug or a load test.
- Database, restored alongside. A new masked database appears next to the one you already have, so work in progress carries on.
- Database, replaced. Your dev or test database is replaced on the same endpoint, so apps and connection strings keep working.
- Backup files. Masked backup files land in an S3 bucket in your dev or test account. Developers can load a copy on their machine, where your data-handling policy allows.
How do you keep the dev copy fresh?
Run the copy on a schedule, every night or every week, and check the schema before every run. If a column was added to production after the masking policy was approved, it has no mask. The run has to stop until a person decides how to mask it.
How do you protect production while this runs?
Use snapshots only, and do not give the copy job permission to change a production database. A copy job that has production credentials, or can change the live database, adds more risk than it removes.
How Washery does it
Washery uses snapshots only. Running Washery does not impact your live database.
The Washery role is denied any change to any production database. One CloudFormation stack in each account creates the role, and the app shows what the role can do.

You link the production account to its dev and test accounts. A masked copy can only go to an account the production account names. Link a destination AWS account shows the steps.
You choose how the masked copy appears in dev.

When a run finishes, the masked copy is in the dev account. Washery re-encrypts the masked snapshot with a delivery key that only the destination accounts can use, shares it, and removes everything else the run created. Runs can be scheduled, or started and followed through the API.

When is this not the right approach?
- You need every change replicated to dev continuously. AWS DMS does that and Washery does not.
- You need a few tables or a subset of the data. Washery copies a whole RDS instance or Aurora cluster.
Source, checked 2 December 2026: Sharing encrypted snapshots for Amazon RDS.