AWS S3 New Feature: Re-encryption without Movement

The recent release of the UpdateObjectEncryption API marks a significant shift in how we manage data security at scale. Historically, changing the encryption of an S3 object was a “physical” operation; you had to move the bits. Now, it’s a “logical” metadata operation.

Technical Deep Dive: Re-encryption without Movement

The “magic” behind this update lies in Envelope Encryption. In the legacy CopyObject In the workflow, S3 had to decrypt the actual data using the old key and re-encrypt it with the new key, effectively creating a new file.

With the UpdateObjectEncryption API, S3 does not touch the underlying data blocks. Instead, it only interacts with the Data Key (DK).

  1. S3 retrieves the encrypted Data Key stored in the object’s metadata.
  2. It uses the old Master Key to decrypt that Data Key.
  3. It immediately re-encrypts that same Data Key using the new KMS Master Key.
  4. The object metadata is updated atomically with the new encrypted Data Key.

Because the data itself (the ciphertext) remains identical, the ETag (which is a hash of the data) and the Creation Date stay exactly the same.

Pros and Cons

Pros

  • Zero Latency on Data: Since no data is moved, the operation takes milliseconds regardless of the file size, from 1 KB to 5 TB.
  • Storage Integrity: It preserves the Last-Modified date, ETag, and Version ID. This is critical for applications that use ETags for cache validation.
  • Archive-Friendly: You can upgrade the encryption on Glacier objects without first “restoring” them. They stay in cold storage.
  • Cost Efficiency: You avoid the data retrieval fees (GET) and data transfer fees associated with copying. You only pay for the API call (PUT price).
  • Intelligent-Tiering Safety: Objects in S3 Intelligent-Tiering do not get “reset” to the Frequent Access tier, preserving your cost-optimization progress.

Cons

  • KMS Only: You can only update to SSE-KMS. It does not support SSE-C or DSSE-KMS.
  • No “Unencrypted” Support: The source object must already be encrypted (SSE-S3 or SSE-KMS). If it’s one of the rare legacy “Plaintext” objects, this API will fail.
  • Object Lock Barrier: If an object is under Legal Hold or Retention Mode, you cannot update its encryption until the lock is removed.
  • KMS ARN Requirement: You cannot use KMS Key Aliases; you must provide the full Amazon Resource Name (ARN).

Comparison: UpdateObjectEncryption vs. CopyObject

FeatureUpdateObjectEncryption (New)CopyObject (Legacy)
Data MovementNone (Metadata update only)Full data copy
Object MetadataPreserved (ETag, Creation Date)Reset (New ETag, New Date)
Glacier SupportWorks while archivedRequires “Restore” first
ThroughputHigh (Atomic/Instant)Limited by object size/bandwidth
CostPUT Request only ($0.005/1k)GET + PUT + Data Retrieval fees
Object LockBlockedCreates new version (if versioned)

Decision Guide: Which should you prefer?

1. Use UpdateObjectEncryption when:

  • Status: Compliance Audit. You need to rotate from AWS-managed keys (SSE-S3) to Customer-managed keys (SSE-KMS) to meet regulatory requirements.
  • Status: Archived Data. You have petabytes of data in Glacier Deep Archive that need an encryption upgrade without the massive cost of restoring them.
  • Status: Massive Objects. You have 5 TB objects where a copy operation would take hours and risk a timeout.
  • Status: ETag Dependent. Your application logic relies on the ETag remaining constant for sync/caching.

2. Use CopyObject when:

  • Status: Unencrypted Source. You are dealing with very old objects that have no encryption at all.
  • Status: Cross-Region/Account. You need to move the data to a different bucket or region while changing encryption.
  • Status: SSE-C Requirements. You need to use Customer-Provided keys (SSE-C), which the new API does not support.
  • Status: Locked Objects. You need to update encryption on an object that is permanently locked (Compliance Mode); in this case, a new copy/version is your only path.

Note on Scale: If you are dealing with millions of objects, do not call this API in a loop. Use S3 Batch Operations. AWS has integrated this new API directly into the Batch console, allowing you to run a “re-encryption” job across an entire bucket with a few clicks.

You can read the official AWS news via https://aws.amazon.com/about-aws/whats-new/2026/01/change-the-server-side-encryption-type-of-s3-objects/

Official AWS Documentation for Updating server-side encryption for existing data.

Posted in: