Needing some help here.
I have a Python script using Boto3 that does S3 Bucket encryption. It was working fine before this and just recently I noticed that when I use the script, it will cause the object to become 0 bytes. It is working just fine if I were to encrypt it manually via the console.
Is anyone facing similar issue and would you mind to share any workaround? At least to recover back the files. I am clueless here.
I've did a quick troubleshooting and found out that when below line is executed, it will change the files to become 0 bytes.
client.put_object(Bucket=bucket_name, Key=object_key, ServerSideEncryption='AES256')
Thank you very much for your help and assistance.
Regards, Ameer.