AWS AmazonS3: Document S3 Replication Multi-Region KMS key resolution and required KMS permissions
Summary
Adds a new 'Using Multi-Region key resolution' section describing how S3 encrypts replicas with the related multi-Region KMS key in the destination Region, including the `UseSourceMultiRegionKey`/`ReplicaKmsKeyID` EncryptionConfiguration options, a sample replication rule, a source/replica encryption behavior table with failure codes, and the required `kms:Decrypt`, `kms:Encrypt`, `kms:GenerateDataKey` grants (and cross-account key-policy grants). Also updates the two prior notes that said S3 treats multi-Region keys as single-Region keys, and rewords the cross-account SSE-KMS note to say the rule must 'use' a customer managed key.
Security assessment
The added content is encryption and IAM guidance for S3 Replication: it specifies which KMS key encrypts replicas, how multi-Region keys are resolved per destination Region, and the exact KMS permissions (`kms:Decrypt` on source, `kms:Encrypt`/`kms:GenerateDataKey` on destination, granted via key policy for cross-account) required. It corrects previously misleading statements that multi-Region keys were treated as single-Region keys. No specific vulnerability, CVE, or incident is referenced, so it is documented security guidance rather than a fix.
Evidence
+With Multi-Region key resolution, grant `kms:Decrypt` on the source multi-Region key in the source Region. Grant `kms:Encrypt` and `kms:GenerateDataKey` on the related multi-Region key in each destination Region. For cross-account replication, the destination account grants these permissions in the key policy.
Diff
diff --git a/AmazonS3/latest/userguide/replication-config-for-kms-objects.md b/AmazonS3/latest/userguide/replication-config-for-kms-objects.md index 3eb8148..ca176ca 100644 --- a//AmazonS3/latest/userguide/replication-config-for-kms-objects.md +++ b//AmazonS3/latest/userguide/replication-config-for-kms-objects.md @@ -36 +36 @@ Note -You can use multi-Region AWS KMS keys in Amazon S3. However, Amazon S3 currently treats multi-Region keys as though they were single-Region keys, and does not use the multi-Region features of the key. For more information, see [ Using multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the _AWS Key Management Service Developer Guide_. +You can use multi-Region AWS KMS keys with S3 Replication. With Multi-Region key resolution, Amazon S3 encrypts each replica with the related multi-Region key in the destination Region. For more information, see Using Multi-Region key resolution and [Using multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the _AWS Key Management Service Developer Guide_. @@ -147,0 +148,43 @@ The following example shows a replication configuration that includes optional c +### Using Multi-Region key resolution + +With Multi-Region key resolution, Amazon S3 encrypts the replica of an object that's encrypted with a multi-Region KMS key by using the related multi-Region key in the destination Region. You don't specify a destination key for these objects. As a result, one rule can replicate objects encrypted with many multi-Region keys. For example, a bucket might store data for many tenants, each encrypted with its own multi-Region key. One rule can replicate all of them, including tenants that you add later. For more information, see [Multi-Region keys in AWS KMS](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the _AWS Key Management Service Developer Guide_. + +To turn on Multi-Region key resolution, first set `SseKmsEncryptedObjects` to `Enabled` in `SourceSelectionCriteria`. Then add `UseSourceMultiRegionKey` with `Status` set to `Enabled` to the `EncryptionConfiguration` element. To replicate objects encrypted with single-Region keys through the same rule, also add `ReplicaKmsKeyID`. + +The following example rule replicates objects with the ``tenants/`` prefix. It uses the related multi-Region key for objects encrypted with multi-Region keys, and the specified key for objects encrypted with single-Region keys. + + + <Rule> + <ID>Rule-1</ID> + <Priority>1</Priority> + <Status>Enabled</Status> + <DeleteMarkerReplication> + <Status>Disabled</Status> + </DeleteMarkerReplication> + <Filter> + <Prefix>tenants/</Prefix> + </Filter> + <SourceSelectionCriteria> + <SseKmsEncryptedObjects> + <Status>Enabled</Status> + </SseKmsEncryptedObjects> + </SourceSelectionCriteria> + <Destination> + <Bucket>arn:aws:s3:::amzn-s3-demo-destination-bucket</Bucket> + <EncryptionConfiguration> + <UseSourceMultiRegionKey> + <Status>Enabled</Status> + </UseSourceMultiRegionKey> + <ReplicaKmsKeyID>Optional: AWS KMS key ARN for objects encrypted with single-Region keys</ReplicaKmsKeyID> + </EncryptionConfiguration> + </Destination> + </Rule> + +The following table shows how Amazon S3 encrypts each replica when Multi-Region key resolution is turned on. + +Source object | Replica +---|--- +Encrypted with a multi-Region key | Encrypted with the related multi-Region key in the destination Region. If that key doesn't exist, is disabled, or is pending deletion, replication fails with `DstKmsKeyNotFound` or `DstKmsKeyInvalidState`. +Encrypted with a single-Region key | Encrypted with the key in `ReplicaKmsKeyID`. If the rule doesn't specify `ReplicaKmsKeyID`, replication fails with `DstKmsKeyNotSpecified`. +Encrypted with SSE-S3, or unencrypted | No change. For more information, see How default bucket encryption affects replication. + @@ -168,0 +212,2 @@ We recommend that you use the `s3:GetObjectVersionForReplication` action instead +With Multi-Region key resolution, grant `kms:Decrypt` on the source multi-Region key in the source Region. Grant `kms:Encrypt` and `kms:GenerateDataKey` on the related multi-Region key in each destination Region. For cross-account replication, the destination account grants these permissions in the key policy. + @@ -362 +407 @@ Note -If you need to replicate SSE-KMS data cross-account, then your replication rule must specify a [customer managed key](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk) from AWS KMS for the destination account. [AWS managed keys](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk) don't allow cross-account use, and therefore can't be used to perform cross-account replication. +If you need to replicate SSE-KMS data cross-account, then your replication rule must use a [customer managed key](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk) from AWS KMS for the destination account. [AWS managed keys](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk) don't allow cross-account use, and therefore can't be used to perform cross-account replication. @@ -412 +457 @@ Note -You can use multi-Region AWS KMS keys in Amazon S3. However, Amazon S3 currently treats multi-Region keys as though they were single-Region keys, and does not use the multi-Region features of the key. For more information, see [ Using multi-Region keys](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) in the _AWS Key Management Service Developer Guide_. +To replicate objects encrypted with multi-Region AWS KMS keys without specifying a destination key for each key, see Using Multi-Region key resolution.