Static vs dynamic data masking: which one dev and test needs
Development and testing need static masking. Static masking changes the sensitive data in a copy of the database, so the copy can be handed to developers. Dynamic masking hides values when someone queries them and leaves them unchanged in storage, so it protects a live database from some of the people who read it, but developers still have no copy they can work on.
Where the real values are
- Static masking
- The values are changed in a copy, and the copy is what developers get. Production is left alone.
- Dynamic masking
- The values stay as they are in the database. What a reader sees is changed each time they query it.
What is static data masking?
Static masking rewrites the sensitive data in a copy of the database and stores the result. The copy holds no real values, so it can leave the production account. It suits a copy that is used again and again, which is what a dev or test database is.
What is dynamic data masking?
Dynamic masking leaves the stored data as it is and changes what a person sees when they query it, based on their role. It is built for a live database that people read with different rights: support staff see part of a card number, and the application sees all of it.
Aurora PostgreSQL has dynamic masking built in, through the pg_columnmask extension, from versions 16.10 and 17.6.
Why is dynamic masking not enough for dev and test?
- The real values are still in the database. A snapshot or a backup of it holds them, and so does any role the masking policy does not cover.
- Developers need a database they can change. They run migrations, load test data and break things. That takes a separate copy, and a copy of production carries the real values with it.
- Developers would need access to production, or to an unmasked copy of it. The aim is to keep developers out of production.
How do the two compare?
| Static masking | Dynamic masking | |
|---|---|---|
| Where it happens | In a copy, each time the copy is refreshed | In the live database, on every query |
| Stored values | Masked | Real |
| Who it protects against | Everyone who has the copy | Readers whose role is masked |
| Can leave the production account | Yes | No |
| Fits | Development, testing and training | Support and reporting on live data |
Can you use both?
Yes. Dynamic masking on production and a static masked copy for dev and test do different jobs. You can use both.
How Washery does it
Washery does static masking for PostgreSQL, MySQL, MariaDB and SQL Server on Amazon RDS, and Aurora PostgreSQL and Aurora MySQL. Washery uses snapshots only. Running Washery does not impact your live database.
Every run rewrites the values in a temporary copy in the production account. It checks the result and delivers only the masked copy to your dev and test accounts. Runs can be scheduled, or started and followed through the API.

Masked values keep their format, so the application and its tests still work. How data is masked shows what each kind of data becomes.
When is static masking not the right approach?
- People need to read live production data with some columns hidden. That is what dynamic masking is for.
- The data has to be current to the second. A static copy is as fresh as its last run.
Sources, checked 2 December 2026: What is data masking? and Using dynamic masking with Aurora PostgreSQL, both from AWS.