I am trying to print the decrypted data with the encrypted data to verify that it is correct.
session = botocore.session.get_session()
client = session.create_client('kms',region_name = 'us-east-1',aws_access_key_id = '[YOUR ACCESS KEY]',aws_secret_access_key = '[YOUR SECRET ACCESS KEY]')
key_id = '[KEY ID]'
plaintext='[FILEPATH\FILENAME.CSV]'
ciphertext = client.encrypt(KeyId=key_id, Plaintext=plaintext)
ciphertextblob = ciphertext
decrypt_ciphertext = client.decrypt(CiphertextBlob = ciphertextblob)
print('Ciphertext: ' ciphertext)
print('Decrypted Ciphertext: 'decrypt_ciphertext)
When I run this code, the data is successfully encrypted, however, when it attempts to decrypt the data it gives me a Parameter Validation Failed error. Does anyone know why it gives this error or how to fix it?