# Pseudonymization

Pseudonymization replaces identifying data with substitute values so records cannot be attributed to a person without separately protected additional information.

Cloud concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/pseudonymization

> Pseudonymization reduces exposure of personal identifiers while preserving useful relationships between records for analytics, testing, and machine learning. Unlike anonymization, it retains a potential path to identification, so pseudonymized data still requires appropriate security controls and generally remains personal data under laws such as the GDPR.

Practice exams covering Pseudonymization: [DEA-C01 AWS Certified Data Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate), [DVA-C02 AWS Certified Developer - Associate](https://blowstack.com/practice-exams/aws-certified-developer-associate), [MLA-C02 (beta) AWS Certified Machine Learning Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate).

## 6 key aspects of Pseudonymization

Effective pseudonymization preserves necessary data relationships while separating identity information, limiting linkability, and maintaining security and governance controls.

1. **Separation of identity and analytical data**: Replace identifying values before distributing data to analytics, development, or ML environments. Protect mappings and transformation secrets separately so access to the processed dataset does not automatically permit identification.
2. **Controlled linkability**: Consistent pseudonyms preserve joins and repeated observations of the same entity. Scope tokens or keys by purpose when cross-dataset correlation is unnecessary or prohibited.
3. **Secure transformation design**: Use appropriately generated random tokens or well-designed keyed transformations rather than predictable substitutions or plain hashes. Plan for identifier normalization, collisions, key management, and transformation versioning.
4. **Residual identification risk**: Replacing direct identifiers does not remove identifying details in free text or combinations of indirect attributes. Evaluate the complete output dataset and its likely linkage with other available information.
5. **Preserved utility with limits**: Pseudonyms support aggregation, relational analysis, and entity-based dataset splitting. They do not necessarily make useful ML features, and stronger isolation between purposes can reduce opportunities for legitimate joins.
6. **Continuing governance obligations**: Pseudonymized records generally retain their personal-data status under the GDPR. Maintain access controls, retention rules, audit trails, and approved re-identification procedures rather than treating the data as unrestricted.

## Cloud services for Pseudonymization

A typical AWS implementation uses Glue to replace identifiers during data preparation, KMS to control cryptographic operations, and a restricted DynamoDB table when reversible token mappings are required. Transformation roles receive narrowly scoped access, while analytics and ML roles receive only processed outputs. Google Cloud Sensitive Data Protection provides an alternative managed transformation approach, including cryptographic pseudonymization capabilities. These services are implementation choices rather than a required combined stack. In either approach, engineers must define token consistency, protect re-identification information, validate transformed outputs, and apply retention and access policies to both original and pseudonymized data.

- **[AWS Glue](https://blowstack.com/tools/cloud-services-hub/aws-glue)**: AWS Glue ETL jobs can transform identifiers before publishing curated datasets, using custom code for keyed pseudonyms or integrations with a token mapping store. Sensitive-data detection can help locate fields requiring treatment, but detection or generic redaction alone does not establish a consistent pseudonymization scheme.
- **[Amazon DynamoDB](https://blowstack.com/tools/cloud-services-hub/amazon-dynamodb)**: DynamoDB can serve as a restricted token-to-identity mapping store for a custom tokenization system. Application logic must enforce stable assignments, uniqueness, authorized lookups, and lifecycle rules; the database itself does not perform pseudonymization.

## Pseudonymization exam questions

Real practice exam questions on Pseudonymization, with the correct answer and its explanation.

### Question 1 (MLA-C02 (beta))

**Question:**

A hospital uses AWS Glue to prepare patient records for two separate ML research studies. Each study must associate a patient's records across monthly deliveries, but the published identifiers must not enable direct patient-level joins between the studies. Researchers must not receive hospital patient IDs or access to information that associates published identifiers with those IDs. An authorized clinical safety team must be able to resolve a flagged identifier back to the hospital patient ID.

Which transformation design meets these requirements?

**Correct answer:** Assign each patient a separate random token for each study. Persist mappings keyed by study and hospital patient ID in a restricted store, reuse each study's tokens across deliveries, and publish only the appropriate study token in place of the patient ID.

**Explanation:** Study-specific, persistent tokens preserve longitudinal relationships within each study without providing a shared identifier for cross-study joins. Keeping the mappings accessible only to the preparation job and authorized safety team separates research access from controlled identity recovery. The resulting data still requires personal-data protections.

### Question 2 (DEA-C01)

**Question:**

A retailer uses AWS Glue jobs to prepare daily purchase and support datasets for analysts. Both datasets contain customer phone numbers, which can have different punctuation and spacing. Analysts must be able to join records for the same customer across both datasets and across processing dates without receiving the phone numbers. Company policy prohibits reversible transformations and token-to-identity mapping tables. The replacement values must also resist identification by analysts who possess a list of likely customer phone numbers. Analysts cannot access secrets used by the Glue jobs.

Which transformation should the data engineer implement?

**Correct answer:** Normalize phone numbers to a common format, calculate HMAC-SHA-256 using the same protected secret key in both jobs, and replace the original phone-number columns with the resulting values.

**Explanation:** Normalization ensures equivalent phone numbers have identical inputs, and using the same key produces stable replacements across datasets and dates. Without access to the secret key, analysts cannot reproduce the values from candidate phone numbers. HMAC is not reversible and requires no identity mapping table. These outputs are pseudonymized data, not necessarily anonymous data, and still require appropriate access controls.

### Question 3 (DVA-C02)

**Question:**

An AWS Lambda function prepares order records for an analytics team. Each record contains a customer email address. Analysts must be able to group orders for the same email address across separate Lambda invocations, but must not receive the email addresses. The replacement identifiers must resist identification by analysts who have lists of likely email addresses. The application must not maintain an email-to-identifier lookup table, and analysts must not have access to transformation secrets. Which implementation best meets these requirements?

**Correct answer:** Have the Lambda function normalize each email address and replace it with an HMAC-SHA-256 value generated with a stable secret key. Restrict access to the key to the transformation function and publish only the transformed records.

**Explanation:** A deterministic HMAC produces the same identifier for the same normalized email address across invocations without a lookup table. Keeping the key inaccessible to analysts prevents them from independently computing identifiers for candidate email addresses. These outputs are pseudonymized, not anonymous, and still require appropriate protection.

## Practice Pseudonymization in a full exam

Questions on Pseudonymization in each practice exam, with every answer option and an explanation for each:

- [MLA-C02 (beta)](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate): 2 questions
- [DEA-C01](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate): 2 questions
- [DVA-C02](https://blowstack.com/practice-exams/aws-certified-developer-associate): 1 question

## What is Pseudonymization

Pseudonymization separates a person's identity from the data used for processing. For example, a transaction pipeline can replace customer email addresses with opaque customer tokens before publishing records to an analytics environment. Analysts can then calculate purchase frequency and join transactions belonging to the same customer without receiving the original email addresses. The token-to-identity mapping, or the secret needed to reproduce the tokens, is additional information that must be protected separately.

Common implementations include randomly generated tokens backed by a restricted mapping store and deterministic keyed transformations such as an HMAC. A mapping store supports controlled re-identification, while an HMAC supports consistent matching without storing every identifier-to-token pair. An HMAC is not decrypted to recover its input, but someone with the key and candidate identifiers can recompute values and identify matches. Ordinary unkeyed hashes of email addresses, telephone numbers, or other predictable values are weak protection because attackers can hash likely inputs and compare results.

In a cloud data pipeline, perform the transformation inside a restricted ingestion or preparation environment before making data available to broader audiences. Keep raw objects, token mappings, cryptographic keys, and pseudonymized outputs behind distinct permissions. Give transformation jobs access to the inputs and secrets they need, but prevent ordinary analytics or training roles from accessing the identity mapping. Encryption at rest and in transit remains necessary: encrypting a storage bucket does not pseudonymize its contents for an authorized reader.

Choose consistency deliberately. Stable tokens preserve joins across tables and support longitudinal analysis, but they also allow records to be linked across datasets. Use purpose-specific keys or token namespaces when unrelated teams should not correlate individuals. Normalize identifiers consistently before transformation, account for collisions, and version the transformation scheme. Changing a key or mapping strategy can break joins and requires a migration plan; key rotation does not automatically update tokens already stored.

For machine learning, pseudonymous identifiers can support entity-level aggregation and grouping records when splitting datasets. However, opaque identifiers are often unsuitable predictive features and can encourage memorization. Remove them from model inputs unless their use is justified, and ensure any retained transformations work consistently during training and inference. Free-text notes, location histories, rare attributes, and combinations of indirect identifiers can still reveal identity even after direct identifiers have been replaced.

Pseudonymization is not synonymous with masking, redaction, or anonymization. Masking may merely hide characters on a screen, and redaction removes selected information rather than preserving an identity-specific substitute. Anonymization requires that individuals are no longer identifiable under the applicable standard; replacing names with tokens does not establish that outcome. Removing a mapping table alone also does not prove anonymity if other data enables identification.

Apply the technique according to the intended use, company policy, and applicable law. Under the GDPR, pseudonymized personal data remains personal data, and pseudonymization alone does not establish a lawful basis for processing. Document authorized re-identification workflows, retention and deletion requirements, access reviews, and audit logging. Test outputs for identifier leakage, and ensure raw identifiers do not escape through logs, temporary files, failed-record queues, or exported training datasets.

## Learn Pseudonymization in lessons

4 short lessons on Pseudonymization in 2 certification courses.

- MLA-C02 (beta): Data Anonymization vs. Pseudonymization (Premium), https://app.blowstack.com/lessons/data-anonymization-vs-pseudonymization-mla-c02
- DEA-C01: Pseudonymization: protected identifier replacement (Premium), https://app.blowstack.com/lessons/pseudonymization-protected-identifier-replacement-dea-c01
- MLA-C02 (beta): Pseudonymization: consistent identifier replacement (Premium), https://app.blowstack.com/lessons/pseudonymization-consistent-identifier-replacement-mla-c02
- DEA-C01: Data Masking and Pseudonymization: disclosure and linkability (Premium), https://app.blowstack.com/lessons/data-masking-and-pseudonymization-disclosure-and-linkability-dea-c01
