AWS DMS data masking: what it does and does not do
AWS DMS can mask columns while it copies or replicates a database, from version 3.5.4. It can replace the digits in a value, or replace the whole value with a 64-character hash. You write a rule for every column you want masked, and you build the rest of the destination database yourself.
What can AWS DMS mask?
AWS DMS has three masking actions. You set one for a column in the table mapping of a replication task.
| Action | What it does | Columns it works on |
|---|---|---|
| Digits mask | Replaces each digit with a character you choose | Text |
| Digits randomize | Replaces each digit with a random digit | Text and numbers |
| Hashing mask | Replaces the value with a SHA-256 hash | Text |
What does that mean for names, email addresses and card numbers?
- Names and email addresses can only be hashed. A hash is always 64 characters, so the destination column must be at least 64 characters wide, or you add a rule that widens it.
- A card number with random digits is a random number. Nine in ten random numbers fail the card check, so an application that validates card numbers rejects most of them.
- Keys need the hash. AWS says to use the hashing mask for primary key, unique and foreign key columns, because the two digit actions do not guarantee unique values.
What do you still have to build?
- The rules. You find every column that holds sensitive data and write a rule for it. A new column has no rule until you add one.
- The checks. DMS leaves masked columns out of its data validation. If a primary key or unique key column is masked, DMS does not validate that table.
- The rest of the database. DMS creates tables and primary keys. Secondary indexes, foreign keys, defaults, views, procedures, functions and triggers are not migrated, and you create them separately.
- A database to read. DMS reads a running database. That is production, or a copy of production that you create first.
When is AWS DMS the right tool?
- You need every change replicated to the destination continuously, with a few columns masked.
- The source or the destination is an engine that only DMS supports.
- The columns you need to mask are numbers, and the application does not validate them.
How Washery does it
Washery gives your developers a masked database that is ready to use, 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.
Washery writes the masking policy and you approve it. Each column gets a method that suits the data in it.

Masked values look real. Examples show the kind of value a method writes. Every value here is made up.
| Kind of data | In production, and in the masked copy |
|---|---|
| Names | Mia ChenbecomesElla Novak |
| Email addresses | mia.chen@gmail.combecomesella.novak418205993127@example.com |
| Card numbers | 4871 8033 4018 7801becomes4372 6167 5136 1341 |
The masked copy is a restored snapshot. Its indexes, keys, views and procedures are already there. Washery checks a sample of every masked copy for sensitive data before it is delivered. Runs can be scheduled, or started and followed through the API.
See how Washery compares with building it yourself.
Sources, checked 2 December 2026: data masking in AWS DMS and the database objects AWS DMS migrates, both from AWS.