1
1
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2
2
# SPDX-License-Identifier: Apache-2.0
3
3
"""
4
- This example sets up the KMS MRK Multi Keyring
4
+ This example sets up the AWS KMS MRK Multi Keyring
5
5
6
6
The AWS Key Management Service (AWS KMS) MRK keyring interacts with AWS KMS to
7
7
create, encrypt, and decrypt data keys with AWS KMS MRK keys.
@@ -51,15 +51,15 @@ def encrypt_and_decrypt_with_keyring(
51
51
mrk_key_id : str ,
52
52
kms_key_id : str ,
53
53
mrk_replica_key_id : str ,
54
- second_region : str
54
+ mrk_replica_decrypt_region : str
55
55
):
56
56
"""Demonstrate an encrypt/decrypt cycle using a Multi-Keyring made
57
57
up of multiple AWS KMS MRK Keyrings
58
58
59
59
Usage: encrypt_and_decrypt_with_keyring(mrk_key_id,
60
60
kms_key_id,
61
61
mrk_replica_key_id,
62
- second_region )
62
+ mrk_replica_decrypt_region )
63
63
:param mrk_key_id: KMS Key identifier for an AWS KMS multi-region key (MRK) located in your
64
64
default region
65
65
:type mrk_key_id: string
@@ -69,8 +69,8 @@ def encrypt_and_decrypt_with_keyring(
69
69
:param mrk_replica_key_id: KMS Key identifier for an MRK that is a replica of the
70
70
`mrk_key_id` in a second region.
71
71
:type mrk_replica_key_id: string
72
- :param second_region : The second region where the MRK replica is located
73
- :type second_region : string
72
+ :param mrk_replica_decrypt_region : The second region where the MRK replica is located
73
+ :type mrk_replica_decrypt_region : string
74
74
75
75
For more information on KMS Key identifiers for multi-region keys, see
76
76
https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id
@@ -151,8 +151,8 @@ def encrypt_and_decrypt_with_keyring(
151
151
152
152
# 9. Create a single AwsKmsMrkKeyring with the replica KMS MRK from the second region.
153
153
154
- # Create a boto3 client for KMS in the second region.
155
- second_region_kms_client = boto3 .client ('kms' , region_name = second_region )
154
+ # Create a boto3 client for KMS in the second region which is the region for mrk_replica_key_id .
155
+ second_region_kms_client = boto3 .client ('kms' , region_name = mrk_replica_decrypt_region )
156
156
157
157
second_region_mrk_keyring_input : CreateAwsKmsMrkKeyringInput = CreateAwsKmsMrkKeyringInput (
158
158
kms_key_id = mrk_replica_key_id ,
0 commit comments