I am simply trying to upload encrypted object to S3 bucket. I have gone through the AWS documentation on SSE. Most confusing part is I am not clear on : 1. If we need to set default server side encryption option to AES256(I am assuming it is S3 managed key) for bucket before uploading object to s3 or 2. we can directly upload to s3 bucket without having any server side encryption option set for that bucket?
Assuming second point true, I have tried to upload object on S3 specifying extra arguments:
s3_con.upload_file('abc.txt','s3_key_path/abc.txt',ExtraArgs={"ServerSideEncryption": "AES256"})
I was able to upload file using above code line but the file was not encrypted. So I guess I need to try first point before uploading to bucket.
How can I upload encrypted object using server side encryption using S3 managed key in python and what steps I need to do for this?