A GDPR deletion request arrives. The user's data is in Postgres, logs, S3 exports and backups. How do you handle it?
AdvancedScenarioData and databases
Answer
Situation read → Deletion has to cover every copy, within a deadline (one month under GDPR). Backups are the hard part, because you can't edit snapshots.
What I'd do →
- Keep a data map: every system that stores personal data, owned and documented.
- Primary stores: delete or anonymise via an automated workflow keyed by user ID, with an audit record of what was done.
- Logs: don't log PII in the first place (mask emails and IPs at the collector), and keep retention short so old logs expire on their own.
- S3 exports: lifecycle-expire them, and keep an index from user ID to object keys so they can be deleted.
- Backups: the common accepted approach is to let them expire on their normal retention and keep a "deleted users" list that's re-applied if a backup is ever restored. Document this in the privacy policy.
- An alternative for some data is crypto-shredding: encrypt each user's data with their own key and delete the key.
Why → Short retention and not logging PII make most of the problem go away before a request arrives.
Interview tip → Mention re-applying deletions after a restore; it shows you've thought about backups properly.
More on Data and databases
A release needs to rename a column that the running app reads and writes. How do you do it with zero downtime?IntermediateHow do you prove your database backups actually work?IntermediateDesign backups for an RDS PostgreSQL database with RPO of 5 minutes and RTO of 1 hour, including a region failure.AdvancedYour migrations run in an init container and two pods ran them at the same time during a deploy, leaving the schema half-applied. How do you fix the approach?IntermediateUpgrade RDS PostgreSQL from 13 to 17 with minimal downtime. How?AdvancedYou need to add an index and a column to a 500-million-row table that's written to constantly. How do you avoid locking it?Advanced