AI & DATA / TECHNICAL EXPLAINER

AWS SCS-C03: S3 Data Protection with Object Lock and Encryption

Amazon S3 data protection is strongest when encryption, versioning, retention, access control, logging, and recovery are designed together. Encryption protects object contents from unauthorized disclosure, […]

In this article

Amazon S3 data protection is strongest when encryption, versioning, retention, access control, logging, and recovery are designed together. Encryption protects object contents from unauthorized disclosure, while S3 Object Lock protects selected object versions from deletion or overwrite for a defined period or legal hold. These controls solve different risks and should not be confused: encryption does not make an object immutable, and Object Lock does not determine who can read the data.

The current AWS Certified Security – Specialty (SCS-C03) includes Data Protection as a major domain. The approved AWS Solutions Architect – Associate and AWS DevOps Engineer – Professional relationships provide architecture and operational context for durable S3 protection.

Understand S3 default encryption first

Amazon S3 automatically applies server-side encryption with S3-managed keys as the baseline for new object uploads. Teams can still choose customer-managed KMS keys when they need stronger key-policy control, separation of duties, audit, or cross-account governance.

Default encryption does not replace bucket policy. A principal that is authorized to read an object can still read it after S3 decrypts the data on the authorized request path.

Encryption policy should therefore be paired with IAM, bucket policy, KMS policy, and network controls.

Use SSE-KMS when key governance matters

SSE-KMS encrypts S3 data using AWS KMS keys and adds KMS authorization and audit to the access path. Customer-managed keys give teams more control over key policy, rotation strategy, grants, and administrative separation.

The trade-off is additional complexity and KMS request cost. Applications must have both S3 permission and the required KMS permission.

Key deletion is especially sensitive because deleting the only KMS key capable of decrypting retained objects can make those objects permanently unreadable.

Use Object Lock for WORM protection

S3 Object Lock protects object versions using a write-once-read-many model. It requires versioning and can apply retention periods, legal holds, or both.

Object Lock protects one object version from deletion or overwrite but does not prevent creation of a newer version with the same key. Investigators and retention processes should therefore reason about version IDs rather than only object names.

The approved secure data lifecycle context is relevant because immutability must align with retention and deletion requirements.

Choose governance mode or compliance mode carefully

Governance mode protects object versions from ordinary deletion or retention changes, but principals with the specific bypass permission can override it when they deliberately request the bypass.

Compliance mode is much stricter: a protected object version cannot be deleted during the retention period, even by the AWS account root user.

Use governance mode for controlled operational protection and testing; use compliance mode only where the business or regulatory requirement justifies its irreversibility.

A legal hold protects an object version without an expiration date and remains until explicitly removed by an authorized principal. It is independent of a retention period.

This is useful when the organization knows an object must remain protected but cannot yet determine the final end date, such as litigation, investigation, or audit.

Legal-hold permission should be restricted because removing one can immediately expose a version to deletion if no retention period remains.

Protect Object Lock administration with IAM

Permissions such as putting retention, applying legal hold, changing bucket Object Lock configuration, and bypassing governance retention are powerful security controls.

Separate ordinary data writers from retention administrators. A ransomware-compromised application role should not also be able to shorten retention or bypass governance.

The access-control principle applies: protection is strongest when privileged retention actions are limited to narrowly governed roles.

Design recovery around versions, retention, and KMS

Versioning plus Object Lock can preserve prior object versions even when an attacker adds a delete marker or uploads malicious replacement content. Recovery processes should know how to identify and restore the correct protected version.

Encryption keys must remain available for the entire recovery and retention horizon. Backup protection is not useful if the object is immutable but the key required to decrypt it is deleted.

The approved backup protection context is useful because recoverability needs independent copies and tested procedures, not merely retention settings.

Monitor encryption and retention state

S3 Inventory can report encryption and Object Lock metadata for large object populations, while CloudTrail can record relevant control-plane and data activity according to configuration.

Monitor changes to bucket encryption, key policy, Object Lock configuration, retention bypass, lifecycle, replication, and access policy.

Security teams should be able to prove which objects are protected and which key protects them before an incident or audit occurs.

Lifecycle rules continue to operate around protected objects but do not override active retention. S3 Lifecycle can continue to transition protected object versions across storage classes, but lifecycle expiration cannot delete a version while an active Object Lock retention period or legal hold prevents deletion.

This allows organizations to combine immutability with lower-cost storage classes while respecting retention.

Model the long-term cost because compliance retention can create large storage populations that cannot be removed early if business assumptions change.

Test destructive scenarios before production

Validate accidental deletion, compromised application credentials, governance bypass, key revocation, lifecycle expiration, restore, and legal-hold workflows in a non-production environment.

The AWS S3 protection model is mature when encryption protects confidentiality, Object Lock protects integrity and retention, IAM protects control-plane authority, and recovery tests prove the organization can still read and restore the protected data.

Object Lock design should begin with the business requirement. Regulatory WORM retention, ransomware recovery, accidental-deletion protection, and litigation preservation are different use cases and may require different retention modes, periods, and administrative roles.

Governance mode is often useful for ransomware and operational recovery because authorized administrators can override retention in exceptional cases. Compliance mode is intended for stronger irreversibility and should be adopted only after the organization accepts that even root cannot shorten retention during the protected period.

Bucket default retention can apply a mode and period automatically to new object versions, reducing the chance that one application forgets to set retention. Individual object settings can still override bucket defaults according to current S3 behavior.

Current S3 Object Lock capabilities also include variable retention using event holds. This can protect objects until a future business event releases the hold, after which a configured duration determines the final retain-until date. Use this only when the organization understands the newer workflow and operational implications.

Event holds and legal holds solve different problems. An event hold participates in variable retention timing, while a legal hold remains until explicitly removed and is independent from the fixed or variable retention period.

Retention condition keys can enforce minimum or maximum allowable retention days in bucket policy. This can prevent applications from writing objects with retention shorter than the organization’s recovery or compliance standard.

Versioning is foundational because Object Lock applies to object versions. Delete markers can hide the current object key without deleting the locked version underneath, which means recovery tooling must enumerate versions rather than assume the latest visible state is the whole history.

Ransomware playbooks should include this detail. An attacker might add delete markers or new encrypted versions while protected clean versions still exist and remain recoverable.

Replication should be reviewed alongside Object Lock. Cross-Region or same-Region replication can protect copies from site-level or account-level incidents, but replicated retention behavior and KMS permissions need explicit testing.

When SSE-KMS protects replicated data, destination roles and keys must be configured so replication and later recovery both succeed. One misconfigured KMS grant can leave the backup architecture incomplete.

S3 Bucket Keys can reduce KMS request cost for supported SSE-KMS workloads, but teams should understand the access and audit implications before enabling them in high-assurance designs.

Dual-layer server-side encryption with AWS KMS keys can provide an additional encryption layer for workloads whose compliance model requires it. The extra protection also adds KMS and operational considerations.

SSE-C is a specialized customer-provided-key mode and should not be confused with customer-managed KMS keys. Current S3 behavior in 2026 disables SSE-C for new general-purpose bucket writes by default unless it is deliberately enabled, which further emphasizes that SSE-KMS is the normal AWS-managed customer-key pattern.

Encryption in transit should be enforced separately through TLS and bucket policy conditions where appropriate. Server-side encryption at rest does not stop an application from sending sensitive data over an insecure path outside S3.

Object ownership should be simplified through bucket-owner-enforced models where appropriate so ACL behavior does not complicate who controls protected versions.

Access logging and CloudTrail data events can support investigations into reads, writes, retention changes, and deletion attempts. Logging should be configured according to risk because high-volume object access can create significant telemetry cost.

Retention administrators should use dedicated roles with strong authentication. The same application principal writing business data should not have permission to bypass governance retention or remove legal holds.

Object Lock changes should be tested with actual SDK or application paths. A console experiment by an administrator may succeed even when the production role lacks required version, retention, or KMS permissions.

Lifecycle rules should be validated against locked versions. Transitions to colder storage can proceed while retention remains in force, but early deletion is prevented until the lock allows it.

Cost models should include this irreversibility. A compliance-mode mistake can commit the organization to storing data for years with no supported early deletion path.

Recovery procedures should identify how operators select a clean version, restore it, confirm encryption access, and re-expose the object to applications without overwriting protected forensic evidence.

Periodic restore drills are essential. The organization should prove that retained versions and KMS keys are usable, not merely that retention configuration exists in the console.

Inventory reports can help verify retention mode, legal-hold status, event-hold metadata, encryption, and version information across large buckets. Use them for compliance evidence and drift detection.

The strongest S3 data-protection design makes confidentiality and immutability independent but complementary: KMS governs who can decrypt, Object Lock governs who can destroy, IAM governs who can administer each control, and recovery exercises prove the data remains usable.

Data-classification policy should decide which buckets require Object Lock and which merely need versioning and backup. Immutability adds strong protection but also operational rigidity and cost.

Object Lock-enabled buckets should have dedicated administrative procedures because the feature cannot simply be disabled later. Teams should understand that versioning also cannot be suspended after Object Lock is enabled.

Compliance-mode testing should happen in a disposable bucket first. A mistaken multi-year retention period in production cannot be shortened even by root once compliance retention is active.

Governance bypass should require a narrowly controlled role and strong monitoring. If the same workload role can write objects and bypass retention, ransomware can neutralize the protection.

Legal holds need case ownership so security teams know who can remove them and what event authorizes release.

S3 replication and backup accounts can strengthen ransomware resilience by separating administrative control. The destination account should not share every credential path with the source environment.

Object Lock and encryption should be included in infrastructure as code so bucket creation, default retention, KMS keys, and policies remain consistent across environments.

Recovery tests should verify one older protected version can be identified, decrypted, restored, and consumed by the application while preserving the original locked evidence.

Bucket policy should also enforce secure transport and approved encryption headers where the organization requires more than S3’s baseline automatic encryption. Policies can prevent uploads that bypass the intended customer-managed KMS key.

KMS grants and key policy need recovery owners separate from the application team. An attacker who compromises the application should not be able to modify both the data and the cryptographic control protecting backups.

Object Lock should be combined with multi-factor or approval controls for the small set of administrators who can bypass governance mode. Those actions should generate high-priority audit events.

Retention should be reviewed when business rules change. Longer retention can be extended on protected versions, but compliance mode cannot simply be shortened because storage cost became inconvenient.

Ransomware exercises should simulate stolen application credentials and verify that the attacker can add or modify current data without being able to destroy protected recovery versions or the keys required to read them.

Security teams should periodically verify that protected buckets still use the expected default encryption key and retention configuration. Drift in either control can create a gap without changing application behavior.

New data classes may require different retention from the original bucket design. When policy diverges significantly, a separate bucket can be safer than complicated exceptions inside one Object Lock configuration.

Keep restore documentation beside retention policy so the organization knows not only how long data is protected, but exactly how to recover a clean, decryptable version during an incident.

Keep retention exceptions rare and reviewed, because every bypass path weakens the ransomware and compliance value of immutability.

Protection should remain simple enough that responders know exactly which versions are safe to restore.

Data-protection reviews should connect retention policy with business deletion obligations. Some records must be preserved, while others must be removed after a defined period; mixing both populations under one irreversible retention policy can create compliance conflict.

Separate buckets or prefixes where policy genuinely differs.

Keep retention, encryption, and recovery ownership aligned so one team does not protect data that another team later cannot restore.