@@ -157,7 +157,7 @@ def setup_awsdbe_client_with_legacy_override(kms_key_id: str, ddb_table_name: st
157
157
policy = policy ,
158
158
)
159
159
160
- # 1 . Create a Keyring. This Keyring will be responsible for protecting the data keys that protect your data.
160
+ # 3 . Create a Keyring. This Keyring will be responsible for protecting the data keys that protect your data.
161
161
# For this example, we will create a AWS KMS Keyring with the AWS KMS Key we want to use.
162
162
# We will use the `CreateMrkMultiKeyring` method to create this keyring,
163
163
# as it will correctly handle both single region and Multi-Region KMS Keys.
@@ -167,7 +167,7 @@ def setup_awsdbe_client_with_legacy_override(kms_key_id: str, ddb_table_name: st
167
167
)
168
168
kms_mrk_multi_keyring : IKeyring = mat_prov .create_aws_kms_mrk_multi_keyring (input = kms_mrk_multi_keyring_input )
169
169
170
- # 2 . Configure which attributes are encrypted and/or signed when writing new items.
170
+ # 4 . Configure which attributes are encrypted and/or signed when writing new items.
171
171
# For each attribute that may exist on the items we plan to write to our DynamoDbTable,
172
172
# we must explicitly configure how they should be treated during item encryption:
173
173
# - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature
@@ -181,7 +181,7 @@ def setup_awsdbe_client_with_legacy_override(kms_key_id: str, ddb_table_name: st
181
181
":attribute3" : CryptoAction .DO_NOTHING ,
182
182
}
183
183
184
- # 3 . Configure which attributes we expect to be included in the signature
184
+ # 5 . Configure which attributes we expect to be included in the signature
185
185
# when reading items. There are two options for configuring this:
186
186
#
187
187
# - (Recommended) Configure `allowedUnsignedAttributesPrefix`:
@@ -211,7 +211,7 @@ def setup_awsdbe_client_with_legacy_override(kms_key_id: str, ddb_table_name: st
211
211
# the ":" prefix should be considered unauthenticated.
212
212
unsignAttrPrefix : str = ":"
213
213
214
- # 4 . Create the DynamoDb Encryption configuration for the table we will be writing to.
214
+ # 6 . Create the DynamoDb Encryption configuration for the table we will be writing to.
215
215
# without the legacy override
216
216
table_configs = {}
217
217
table_config = DynamoDbTableEncryptionConfig (
@@ -235,7 +235,7 @@ def setup_awsdbe_client_with_legacy_override(kms_key_id: str, ddb_table_name: st
235
235
table_configs [ddb_table_name ] = table_config
236
236
tables_config = DynamoDbTablesEncryptionConfig (table_encryption_configs = table_configs )
237
237
238
- # 5 . Create the EncryptedClient
238
+ # 7 . Create the EncryptedClient
239
239
return EncryptedClient (
240
240
client = boto3 .client ("dynamodb" ),
241
241
encryption_config = tables_config ,
0 commit comments