<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yuichi Sato</title>
    <description>The latest articles on DEV Community by Yuichi Sato (@sassssan68).</description>
    <link>https://dev.to/sassssan68</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3682693%2F484b6f46-a771-4425-a5de-ce2c21c25ed2.png</url>
      <title>DEV Community: Yuichi Sato</title>
      <link>https://dev.to/sassssan68</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sassssan68"/>
    <language>en</language>
    <item>
      <title>Cryptographic Erasure: A Data Deletion Strategy Using AWS KMS</title>
      <dc:creator>Yuichi Sato</dc:creator>
      <pubDate>Tue, 17 Mar 2026 11:57:10 +0000</pubDate>
      <link>https://dev.to/aws-builders/cryptographic-erasure-a-data-deletion-strategy-using-aws-kms-o7b</link>
      <guid>https://dev.to/aws-builders/cryptographic-erasure-a-data-deletion-strategy-using-aws-kms-o7b</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This article was originally written in Japanese and published on Qiita. It has been translated with the help of AI.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Original article: &lt;a href="https://qiita.com/sassssan68/items/a406e971217c1523026b" rel="noopener noreferrer"&gt;https://qiita.com/sassssan68/items/a406e971217c1523026b&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Are you really sure your data is deleted?&lt;/p&gt;

&lt;p&gt;With a shift in mindset and AWS KMS, you can effectively achieve data deletion.&lt;/p&gt;

&lt;p&gt;This article covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Challenges of traditional data deletion&lt;/li&gt;
&lt;li&gt;The concept of Cryptographic Erasure&lt;/li&gt;
&lt;li&gt;How to implement Cryptographic Erasure with AWS KMS&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Background and Challenges
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Scenario 1: User Account Deletion
&lt;/h2&gt;

&lt;p&gt;Imagine you're running a SaaS service and a user requests to close their account. You need to delete all of that user's data.&lt;/p&gt;

&lt;p&gt;You might think, "Just run a DELETE statement on the database, right?" But in reality, data exists in many places:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Production database ← You can delete here&lt;/li&gt;
&lt;li&gt;Database backups ← But there are 30 days' worth...&lt;/li&gt;
&lt;li&gt;Log files ← Stored in S3...&lt;/li&gt;
&lt;li&gt;Analytics data warehouse ← Copies in Redshift too...&lt;/li&gt;
&lt;li&gt;Dev/staging environments ← Using masked production data...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Deleting everything without missing anything is practically very difficult.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 2: System Decommissioning / Service Shutdown
&lt;/h2&gt;

&lt;p&gt;When a SaaS service is no longer profitable and you decide to shut it down, you still need to delete all the data you've been handling.&lt;/p&gt;

&lt;p&gt;Just like Scenario 1, data is scattered across databases, backups, logs, and more. On top of that, cloud environments automatically replicate data for availability and fault tolerance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-AZ RDS and DynamoDB&lt;/li&gt;
&lt;li&gt;Automated backups and snapshots stored in S3&lt;/li&gt;
&lt;li&gt;Cross-region replicas&lt;/li&gt;
&lt;li&gt;Data forwarded via CloudWatch Logs or Kinesis to downstream systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On-premises, you could physically destroy the disks as a last resort, but in the cloud, you can't touch physical storage (Shared Responsibility Model). This makes it even harder to confidently say, "Everything has been deleted."&lt;/p&gt;

&lt;h2&gt;
  
  
  The Risks of "Thinking You Deleted It"
&lt;/h2&gt;

&lt;p&gt;Lingering data poses risks such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data breaches&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Data you thought was deleted gets restored from backups and leaked&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Regulatory violations&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Failure to comply with GDPR's "Right to Be Forgotten" can result in fines&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Audit findings&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Being flagged for "no evidence of data deletion"&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h1&gt;
  
  
  What Is Cryptographic Erasure?
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Destroy the Key, and the Data Becomes Garbage
&lt;/h2&gt;

&lt;p&gt;Cryptographic Erasure is a sanitization method defined in NIST SP 800-88.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://csrc.nist.gov/pubs/sp/800/88/r2/final" rel="noopener noreferrer"&gt;https://csrc.nist.gov/pubs/sp/800/88/r2/final&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's essentially a shift in mindset:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Traditional approach&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Deleting data = erasing the data itself&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Cryptographic Erasure approach&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Deleting data = making the data impossible to decrypt (by destroying the key)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Encrypted data without its key is nothing more than meaningless bytes.&lt;/p&gt;

&lt;p&gt;In other words, &lt;strong&gt;if you delete the key, the data is effectively deleted — even if it physically remains&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Traditional Deletion vs. Cryptographic Erasure
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Traditional Deletion&lt;/th&gt;
&lt;th&gt;Cryptographic Erasure&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;↓ (Cannot be decrypted)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backups&lt;/td&gt;
&lt;td&gt;❌ (Cannot delete during retention period)&lt;/td&gt;
&lt;td&gt;↓ (Cannot be decrypted)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Logs&lt;/td&gt;
&lt;td&gt;❌ (Mixed with other logs)&lt;/td&gt;
&lt;td&gt;↓ (Cannot be decrypted)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Analytics&lt;/td&gt;
&lt;td&gt;△ (Requires manual work)&lt;/td&gt;
&lt;td&gt;↓ (Cannot be decrypted)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Encryption key&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Traditional Deletion&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Complete deletion is difficult&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Cryptographic Erasure&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Deleting the key renders all data unrecoverable&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Benefits of Cryptographic Erasure
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Invalidate all distributed data at once&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Wherever the data exists, destroying the key invalidates it all&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Safe even if backups are restored&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Restored backups are unreadable without the key&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Auditable evidence&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;A record of "when the key was deleted" is preserved&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h1&gt;
  
  
  What Is AWS KMS?
&lt;/h1&gt;

&lt;p&gt;AWS KMS (Key Management Service) is a key management service provided by AWS. It allows you to securely create, store, and delete encryption keys.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/kms/latest/developerguide/overview.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/kms/latest/developerguide/overview.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Key features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fully managed&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;AWS handles key storage and protection&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Audit-ready&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Key usage history is recorded in CloudTrail&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Integrated with other AWS services&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Can be used to encrypt S3, RDS, EBS, and more&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Types of KMS Keys
&lt;/h2&gt;

&lt;p&gt;AWS KMS offers three types of keys:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Can Be Deleted?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AWS owned keys&lt;/td&gt;
&lt;td&gt;Used internally by AWS; invisible to users&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AWS managed keys&lt;/td&gt;
&lt;td&gt;Automatically created, e.g., &lt;code&gt;aws/s3&lt;/code&gt;, &lt;code&gt;aws/rds&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Customer managed keys&lt;/td&gt;
&lt;td&gt;Created and managed by the user&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Two Types of Customer Managed Keys
&lt;/h3&gt;

&lt;p&gt;Customer managed keys are further divided into two types based on the origin of the key material (the actual cryptographic key data):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Key Material&lt;/th&gt;
&lt;th&gt;Immediate Deletion&lt;/th&gt;
&lt;th&gt;Characteristics&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;KMS-generated key&lt;/td&gt;
&lt;td&gt;Generated and managed by AWS&lt;/td&gt;
&lt;td&gt;❌ (7–30 day waiting period)&lt;/td&gt;
&lt;td&gt;Easy to operate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Imported key&lt;/td&gt;
&lt;td&gt;Brought in from outside&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;Useful when immediate deletion is required&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Features Required for Cryptographic Erasure
&lt;/h2&gt;

&lt;p&gt;Customer managed keys in AWS KMS have all the features needed for Cryptographic Erasure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Key creation&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Keys can be created per user or per system&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Key management&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Keys can be given aliases for easier identification&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Key deletion&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Keys that are no longer needed can be deleted&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Envelope Encryption
&lt;/h2&gt;

&lt;p&gt;AWS KMS uses a method called "Envelope Encryption." This is the technical mechanism that makes Cryptographic Erasure work.&lt;/p&gt;

&lt;p&gt;Here's how it works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A KMS key is used to generate a "data key"&lt;/li&gt;
&lt;li&gt;The data key is used to encrypt the actual data&lt;/li&gt;
&lt;li&gt;The data key itself is encrypted with the KMS key and stored&lt;/li&gt;
&lt;li&gt;The plaintext data key is immediately discarded&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So only two things are stored: the "encrypted data key" and the "encrypted data." Neither can be decrypted without the original KMS key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is the key point:&lt;/strong&gt;&lt;br&gt;
When a KMS key is deleted, the data key can no longer be decrypted, and consequently, the data itself becomes unrecoverable. This is the mechanism behind "destroy the key, invalidate all the data."&lt;/p&gt;
&lt;h1&gt;
  
  
  Practical Design
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Scenario 1: User Account Deletion
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Design Approach: Issue a KMS Key per User
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;At user registration:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;User A registers → KMS Key A is created&lt;/li&gt;
&lt;li&gt;User B registers → KMS Key B is created&lt;/li&gt;
&lt;li&gt;User C registers → KMS Key C is created&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When User A closes their account:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Schedule deletion of KMS Key A&lt;/li&gt;
&lt;li&gt;After the waiting period (7–30 days), the key is deleted&lt;/li&gt;
&lt;li&gt;User A's data becomes unrecoverable&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;User B and User C's data remain unaffected.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Benefits of This Design
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Only the departing user's data is invalidated&lt;/li&gt;
&lt;li&gt;No impact on other users&lt;/li&gt;
&lt;li&gt;Easier to comply with GDPR's "Right to Be Forgotten"&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Scenario 2: System Decommissioning / Service Shutdown
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Design Approach: Issue a KMS Key per System (or Tenant)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;At system build:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;System X → KMS Key X is created&lt;/li&gt;
&lt;li&gt;All data for System X is encrypted with KMS Key X&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;At system decommissioning:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Schedule deletion of KMS Key X&lt;/li&gt;
&lt;li&gt;After the waiting period (7–30 days), the key is deleted&lt;/li&gt;
&lt;li&gt;All data for System X becomes unrecoverable&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Even if backups remain, the data is unreadable after restoration.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Benefits of This Design
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;All system data can be invalidated at once&lt;/li&gt;
&lt;li&gt;Covers tape backups and DR site data as well&lt;/li&gt;
&lt;li&gt;Auditable evidence of "complete deletion" is preserved&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Comparing the Two Scenarios
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;User Account Deletion&lt;/th&gt;
&lt;th&gt;System Decommissioning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Key granularity&lt;/td&gt;
&lt;td&gt;Per user&lt;/td&gt;
&lt;td&gt;Per system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Number of keys&lt;/td&gt;
&lt;td&gt;Many (one per user)&lt;/td&gt;
&lt;td&gt;Few (one per system)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scope of deletion impact&lt;/td&gt;
&lt;td&gt;Single user&lt;/td&gt;
&lt;td&gt;Entire system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h1&gt;
  
  
  Implementation Considerations
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Cost
&lt;/h2&gt;

&lt;p&gt;AWS KMS incurs the following charges (as of February 2026):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;KMS key storage&lt;/td&gt;
&lt;td&gt;~$1/month/key/region&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API requests&lt;/td&gt;
&lt;td&gt;~$0.03/10,000 requests&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you create a key per user, costs grow with the number of users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: 100,000 users&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Key storage alone: ~$100,000/month&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Deletion Is Not Immediate (With Exceptions)
&lt;/h2&gt;

&lt;p&gt;KMS key deletion has a mandatory waiting period:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Minimum: 7 days&lt;/li&gt;
&lt;li&gt;Maximum: 30 days&lt;/li&gt;
&lt;li&gt;Default: 30 days&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;During this period, deletion can be cancelled. This is a safety feature to prevent accidental deletion, but it cannot meet requirements for "delete everything right now."&lt;/p&gt;
&lt;h3&gt;
  
  
  Exception: Use Imported Keys When Immediate Deletion Is Required
&lt;/h3&gt;

&lt;p&gt;KMS keys with externally imported key material are the exception.&lt;/p&gt;

&lt;p&gt;Running the following command immediately deletes the key material. Unless it's re-imported, the data is permanently unrecoverable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Immediately delete the key material&lt;/span&gt;
aws kms delete-imported-key-material &lt;span class="nt"&gt;--key-id&lt;/span&gt; &amp;lt;your-key-id&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;⚠️ Warning&lt;/strong&gt;&lt;br&gt;
Imported keys require generating, managing, and importing key material externally, which adds operational complexity. Carefully evaluate whether immediate deletion is truly necessary.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Design Early
&lt;/h2&gt;

&lt;p&gt;Retrofitting Cryptographic Erasure into an existing system is difficult. Applying it to existing systems may require re-encrypting all data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Customer Managed Keys
&lt;/h2&gt;

&lt;p&gt;When you enable encryption for S3 or RDS, AWS managed keys may be used by default. AWS managed keys (&lt;code&gt;aws/s3&lt;/code&gt;, &lt;code&gt;aws/rds&lt;/code&gt;, etc.) &lt;strong&gt;cannot be deleted&lt;/strong&gt;. Since you can't delete them, you can't perform Cryptographic Erasure — so &lt;strong&gt;always specify a customer managed key&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here are the default encryption settings for major services and what's needed for Cryptographic Erasure:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Default Encryption&lt;/th&gt;
&lt;th&gt;For Cryptographic Erasure&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;S3&lt;/td&gt;
&lt;td&gt;SSE-S3 or aws/s3&lt;/td&gt;
&lt;td&gt;Configure SSE-KMS with a customer managed key (also enable &lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-key.html" rel="noopener noreferrer"&gt;S3 Bucket Key&lt;/a&gt; to reduce KMS API costs)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RDS&lt;/td&gt;
&lt;td&gt;aws/rds&lt;/td&gt;
&lt;td&gt;Create with a customer managed key specified&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EBS&lt;/td&gt;
&lt;td&gt;aws/ebs&lt;/td&gt;
&lt;td&gt;Create with a customer managed key specified&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;Here are the key takeaways about Cryptographic Erasure:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Shift your mindset&lt;/strong&gt; from "delete the data" to "delete the key"&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Invalidate distributed data all at once&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;AWS KMS makes it achievable in a &lt;strong&gt;fully managed&lt;/strong&gt; way&lt;/li&gt;
&lt;li&gt;Applicable to both &lt;strong&gt;user account deletions&lt;/strong&gt; and &lt;strong&gt;system decommissioning&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost&lt;/strong&gt; and &lt;strong&gt;design&lt;/strong&gt; require upfront planning&lt;/li&gt;
&lt;li&gt;Cryptographic Erasure &lt;strong&gt;requires customer managed keys&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Lingering data poses risks such as data breaches and regulatory violations. Let's address them properly with Cryptographic Erasure!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>kms</category>
      <category>security</category>
      <category>encryption</category>
    </item>
  </channel>
</rss>
