I have an encrypted file at an s3 bucket. I want to decrypt it programmatically without downloading it to my local machine. Is it possible to decrypt an encrypted file without downloading it to my local machine?
Things I'm using to encrypt the file: boto3 library, KMS keys for encryption aws sdk , python script
I can definitely download this file and then decrypt it in my local machine like this:
with aws_encryption_sdk.stream(
mode='d',
source=src_file,
key_provider=kms_key
) as decryptor:
for block in decryptor:
tgt_file.write(block)
But this is possible if I download the file to the local system. I don't want to download the file. I want to decrypt it inside the s3 bucket and enable the next process to work on this decrypted file.
Any pointers will be highly appreciated!