Skip to main content

ReplicateKey

Creates a replica of a multi-Region KMS key in a different Region.

Description

Creates a replica of a multi-Region KMS key in a different Region. This operation creates a KMS key with the same key ID and key material as the primary key. The replica key also has the same key usage, key policy, description, and tags as the primary key, unless you specify different values in the request.

Request Syntax

Headers

NameDescriptionRequiredType
Content-TypeMust be "application/x-amz-json-1.1"Yesstring
X-Amz-TargetMust be "TrentService.ReplicateKey"Yesstring

Request Body

NameDescriptionRequiredType
KeyIdIdentifies the multi-Region primary key that is being replicated. Specify the key ID or key ARN of a multi-Region primary key.Yesstring
ReplicaRegionThe Region ID of the Region that will contain the key replica.Yesstring
DescriptionA description of the KMS key. The default value is an empty string (no description).Nostring
PolicyThe key policy that authorizes use of the KMS key. The default value is the default key policy.Nostring
TagsOne or more tags. Each tag consists of a tag key and a tag value.Noarray
POST / HTTP/1.1
Content-Type: application/x-amz-json-1.1
X-Amz-Target: TrentService.ReplicateKey
{ "KeyId": "mrk-1234567890abcdef0", "ReplicaRegion": "us-west-2", "Description": "Example replica key", "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Enable IAM User Permissions\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::111122223333:root\"},\"Action\":\"kms:*\",\"Resource\":\"*\"}]}", "Tags": [ { "TagKey": "Purpose", "TagValue": "Test" } ] }
Values in italics indicate user input and should be replaced with actual values.

Response Elements

NameDescriptionRequiredType
ReplicaKeyMetadataDetailed information about the replica key.NoString
ReplicaPolicyThe key policy of the replica key.NoString
ReplicaTagsThe tags on the replica key.NoString

Special Errors

Error CodeDescription
DisabledExceptionThe request was rejected because the specified KMS key is not enabled.
InvalidKeyUsageExceptionThe request was rejected because the specified KeyUsage value is not valid.
KMSInvalidStateExceptionThe request was rejected because the state of the specified resource is not valid for this request.
KMSNotFoundExceptionThe request was rejected because the specified entity or resource could not be found.
TagExceptionThe request was rejected because one or more tags are not valid.
UnsupportedOperationExceptionThe request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation.

Permissions

To use the ReplicateKey operation, you must have the following permissions:

  • kms:ReplicateKey on the primary key
  • kms:CreateKey in the replica region

Try It Out

Test ReplicateKey

Create a replica of a multi-Region KMS key.

Coming Soon

This feature is currently under development and will be available soon.