GDPR puts the choice in the customer's hands; the FDE must execute in the right order and leave evidence for every step.

Key Points at a Glance

  • Under GDPR Article 28(3)(g), whether data is deleted or returned is decided by the customer (the controller); the FDE has no authority to decide on the customer's behalf.
  • Once a KMS key is deleted, data encrypted with it is permanently unrecoverable, so disable the key first and schedule deletion afterward.
  • Customers are entitled to proof of compliance, so every step should leave a record that can be shown in an audit.

For personal data, one short clause in the GDPR determines how the final week of every contract wraps up. Article 28(3)(g) states that when a service ends, the processor must delete or return all personal data, and the choice between the two belongs to the controller, i.e., the customer.

That sounds like a legal department matter. But the person who actually holds admin access, encryption keys, and integration tokens is usually the Forward Deployed Engineer (FDE). You are the one typing the commands on the last day, so you need to know whose decision you are executing.

In the project's final week, you typically still hold admin access to the customer's cloud account, a project-specific encryption key, and several tokens that connectors use to read the customer's systems.

A clean handoff means: no one retains access they no longer need, data goes where the customer chose, and when the customer comes back six months later with questions, you have enough evidence to answer.

Why order matters more than commands?

Offboarding involves three things: revoking access, exporting or returning data, and deletion. Once the order goes wrong, the loss is usually irreversible. Delete the key before the export finishes, and the data is gone forever.

Revoke access too late, and you create the anti-pattern called out by AWS Well-Architected: terminated or inactive identities still holding permissions, increasing the risk of unauthorized access.

That guidance recommends documenting the access lifecycle, from initial authorization and periodic reviews all the way to offboarding, so this final phase should be planned from day one.

The fourth item is the easiest to forget: evidence. GDPR Article 28(3)(h) requires processors to provide customers with all information needed to demonstrate compliance and to cooperate with audits. Saying "it's been deleted" is not enough; you must be able to state what was deleted, when, and how.

Step one is an email

Before touching any system, get the customer's written choice. Ask specific questions: delete or return; if returned, in what format, sent where, and who on the customer's side signs off on receipt. GDPR gives the choice to the controller, so a verbal agreement in the last meeting is not enough.

If the customer chooses return, export the data while you still have read access. Use least privilege, just enough for the export, and record checksums and record counts so the recipient can verify. Only after the customer confirms full receipt should you move on to revocation and deletion.

Revoke access for people and machines

The visible part is human accounts: IAM users, SSO, VPN, code repository permissions. The Cloud Security Alliance (CSA) notes that accounts and credentials can be revoked immediately when a person leaves. It also warns that data left uncleaned after offboarding easily leads to compliance violations and unauthorized access.

What's easily missed is machine identity. The data pipelines, agents, and connectors you built often hold OAuth tokens issued by the customer's systems. RFC 7009 defines revocation: servers must support revoking refresh tokens and should support revoking access tokens.

So on servers that follow the RFC, revoking refresh tokens is a step you can always rely on. If a server doesn't support revoking access tokens, a token may remain usable until it expires, so record its expiration time in the handoff documentation.

A complete example runbook

Suppose an FDE has just completed a retrieval-augmented generation (RAG) project for an insurance company. Customer case files are stored in S3, encrypted with a project-specific KMS key. A connector reads the CRM via OAuth. The customer has replied by email: they want one export, and everything else deleted.

After the customer confirms the exported data was received in full, the runbook looks roughly like this:

# 1. 撤销连接器的 refresh token(RFC 7009)
curl -X POST https://auth.example-crm.com/oauth/revoke \
  -u "$CLIENT_ID:$CLIENT_SECRET" \
  -d "token=$REFRESH_TOKEN" -d "token_type_hint=refresh_token"

# 2. 停用项目服务账号的访问密钥
aws iam update-access-key --user-name rag-pipeline \
  --access-key-id "$KEY_ID" --status Inactive

# 3. 先禁用 KMS 密钥,观察是否有东西出错
aws kms disable-key --key-id "$PROJECT_KMS_KEY"

# 4. 确认无误后,以最长等待期安排删除
aws kms schedule-key-deletion --key-id "$PROJECT_KMS_KEY" \
  --pending-window-in-days 30

Steps 3 and 4 are where you most need to slow down. AWS states explicitly that once a KMS key is deleted, data encrypted with it can no longer be decrypted and is unrecoverable. This is an extremely thorough form of deletion; there is no way back.

That's why AWS mandates a waiting period of 7 to 30 days before deletion and recommends disabling the key first when in doubt. If, while the key is disabled, one of the customer's dashboards suddenly reports decryption errors, you've discovered a shared key usage nobody documented, and there's still time to re-enable it.

Crypto-erasure and backup traps

Deleting data by deleting its key has a formal name. NIST SP 800-88 Rev. 2, the media sanitization guide published in September 2025 to replace Rev. 1, retains crypto-erasure (CE) as a common technique applicable to any encrypted media.

For other techniques, Rev. 2 points to IEEE 2883, NSA specifications, or organizationally approved standards.

But crypto-erasure is only complete when the key itself no longer exists elsewhere. AWS warns that for CloudHSM-backed keys, KMS does not remove key material from cluster backups. Those backups are copies of the key, not of the data: as long as a backup exists, the key can be restored, so it must be deleted separately.

Copies of the data itself are another gap. Snapshots, old export files on laptops, or a staging bucket encrypted with a different key are all outside the scope of deleting the project key; each needs its own deletion method.

The solution is to build a scope table before executing the runbook. One row for every place data or keys live: which key is used, how to delete it, and what the evidence is.

Location of data or keysDeletion methodEvidence retained
S3 bucket encrypted with the project keyCrypto-erasure via KMSLog of the schedule-key-deletion command and the deletion date
Key material in CloudHSM cluster backupsDelete the backups still holding the key separatelyList of IDs of deleted backups
Connector OAuth tokensRevoke per RFC 7009Response from the revoke endpoint
Export files on personal computersDelete per organizational standardsSigned confirmation from the computer's owner

The most common mistakes

The most common mistake is deciding for the customer. A conscientious FDE wants to "clean everything up" and deletes it all, while the customer actually needed a returned copy to migrate to a new vendor. Under Article 28, that choice isn't yours.

The second mistake is choosing the shortest KMS waiting period to finish sooner. Seven days is legal, but it shortens the window for discovering shared key usage. The third mistake is forgetting tokens and backups, two things that never appear on user management pages.

The last mistake is treating offboarding as a one-time task. NIST describes sanitization as establishing a mechanism that adopts appropriate techniques. If every project rewrites its own runbook, sooner or later one project will miss a step.

Put the contract's last day on your resume

Project wrap-ups don't deliver flashy new features, so few people put them on a resume. Write one concrete line: you wrote the offboarding runbook, used "disable first, wait, then delete" to prevent accidental deletion, and handed the customer a scope table with supporting evidence.

When introducing past projects in interviews, also talk about how you wrapped them up. Interviewers will see that your responsibility for customer data extends to the very last day of the contract.

The last day is the customer's final look at how you handle their data. A complete scope sheet plus a confirmation email is enough to make the farewell not turn into an incident.

Was this article helpful?

Thanks for your feedback!

Next on the roadmap · Phase 5: Deployment and launch Before the customer's IT team asks about port 80, draw up the outbound list first. The host list comes from the vendor's official sources, requests are made by domain rather than IP, and every line is explained clearly before submitting the firewall ticket.