# Deploy Amazon S3 Object Lock with Cross-Region Replication and KMS encryption using AWS CloudFormation

DevFeed: [Deploy Amazon S3 Object Lock with Cross-Region Replication and KMS encryption using AWS CloudFormation](<https://devfeed.tech/articles/deploy-amazon-s3-object-lock-with-cross-region-replication-and-kms-encryption-using-aws-cloudformation-133434.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/storage/deploy-amazon-s3-object-lock-with-cross-region-replication-and-kms-encryption-using-aws-cloudformation/>)

Author: Ranvir Singh

Published: 2026-11-13T18:55:37Z

Content type: tutorial

Language: en

Sources: [AWS Storage Blog](<https://devfeed.tech/sources/aws-storage-blog.md>)

Topics: [Amazon S3](<https://devfeed.tech/topics/amazon-s3.md>), [AWS CloudFormation](<https://devfeed.tech/topics/aws-cloudformation.md>), [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [versioning](<https://devfeed.tech/topics/versioning.md>)

Tags: [advanced-300](<https://devfeed.tech/tags/advanced-300.md>), [amazon-s3](<https://devfeed.tech/tags/amazon-s3.md>), [amazon-s3-cross-region-replication-crr](<https://devfeed.tech/tags/amazon-s3-cross-region-replication-crr.md>), [amazon-s3-object-lock](<https://devfeed.tech/tags/amazon-s3-object-lock.md>), [amazon-simple-storage-service-amazon-s3](<https://devfeed.tech/tags/amazon-simple-storage-service-amazon-s3.md>), [amazon-simple-storage-service-s3](<https://devfeed.tech/tags/amazon-simple-storage-service-s3.md>), [aws-cli](<https://devfeed.tech/tags/aws-cli.md>), [aws-cloud-storage](<https://devfeed.tech/tags/aws-cloud-storage.md>), [aws-cloudformation](<https://devfeed.tech/tags/aws-cloudformation.md>), [aws-command-line-interface-aws-cli](<https://devfeed.tech/tags/aws-command-line-interface-aws-cli.md>), [aws-identity-and-access-management-iam](<https://devfeed.tech/tags/aws-identity-and-access-management-iam.md>), [aws-key-management-service](<https://devfeed.tech/tags/aws-key-management-service.md>), [aws-key-management-service-aws-kms](<https://devfeed.tech/tags/aws-key-management-service-aws-kms.md>), [bring-your-own-key](<https://devfeed.tech/tags/bring-your-own-key.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [infrastructure-as-code](<https://devfeed.tech/tags/infrastructure-as-code.md>), [replication](<https://devfeed.tech/tags/replication.md>), [retention](<https://devfeed.tech/tags/retention.md>), [server-side-encryption-using-aws-key-management-service-sse-kms](<https://devfeed.tech/tags/server-side-encryption-using-aws-key-management-service-sse-kms.md>), [storage](<https://devfeed.tech/tags/storage.md>), [technical-how-to](<https://devfeed.tech/tags/technical-how-to.md>), [worm](<https://devfeed.tech/tags/worm.md>)

## AI overview

The post describes a three-stack CloudFormation deployment for S3 Object Lock, cross-Region replication, and SSE-KMS encryption. Deploy the destination bucket and its Regional KMS key first, then a replication role and source key, then the source bucket and replication rule. Both buckets require versioning and Object Lock; KMS-encrypted replication requires explicit opt-in and role permissions for both Regional keys. The separate role stack provides a real ARN in time to grant access when using an existing key. Object Lock retention and legal-hold state replicate with the objects. Replication is asynchronous by default; optional S3 Replication Time Control adds timing visibility and an SLA, with extra per-GB cost. The article notes that cross-Region CloudFormation references require orchestration, and retained buckets and keys need manual cleanup. Templates are examples requiring review and testing; COMPLIANCE retention cannot be shortened or removed before expiry.

## Source excerpt

Learn how to deploy Amazon S3 Object Lock, cross-Region replication, and SSE-KMS encryption together as infrastructure as code with AWS CloudFormation. This post uses a three-stack pattern that correctly replicates Object Lock retention state and KMS-encrypted objects across two Regions for compliant, encrypted, WORM-protected storage.