Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

When boto3 downloads an encrypted S3 object, does the object get decrypted as well?

 s3.Bucket(bucket_name).download_file(key, destination)

I use the above boto3 code to download an S3 object.

The object on S3 that I’m trying to download using the code above is encrypted using KMS encryption.

Will download_file decrypt the object as well while it downloads the same?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

If it is using S3 server side encryption, then yes S3 will decrypt it and you download a decrypted file. The download will happen over SSL/TLS so it will be protected by encryption in transit. Note that the IAM role performing the download will need to have decrypt permission on the KMS key as well.

If the file was encrypted using client side encryption, then you would have to decrypt it after download.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading