I turned on default encryption with AWS Key Management Service (AWS KMS) on my Amazon Simple Storage Service (Amazon S3) bucket. I want to know what happens to the encryption of new objects and objects that I previously uploaded.
Resolution
After you turn on default AWS KMS encryption on your bucket, by default Amazon S3 encrypts only newly uploaded objects that don't have encryption settings.
Default bucket encryption doesn't change the encryption settings of objects that you've previously uploaded. For example, you can turn on server-side encryption with AWS Key Management Service (AWS KMS) keys (SSE-KMS) on the bucket. Then, any unencrypted objects already in the bucket remain unencrypted. Also, objects already encrypted with SSE-KMS, server-side encryption with Amazon S3 managed keys (SSE-S3), or server-side encryption with customer-provided keys (SSE-C) remain encrypted in their respective key.
Default bucket encryption doesn't override the encryption settings that you specify when you upload a new object. For example, if you specify AES256 encryption in your PutObject request to a bucket with default SSE-KMS encryption, then the object retains AES256 encryption.
If your bucket has default encryption but newly uploaded objects have different encryption settings, then check AWS CloudTrail data event logs. Logs for PUT, POST, and InitiateMultipartUpload API requests have an SSE applied field. If the value of this field is Default_SSE_S3 or Default_SSE_KMS, then the object has default encryption.
To update the encryption type of an encrypted object from SSE-S3 to SSE-KMS, use the UpdateObjectEncryption API operation. The UpdateObjectEncryption API operation uses envelope encryption to re-encrypt the data encryption key with your newly specified server-side encryption type.
Note: To require users to upload objects with SSE-KMS, use a bucket policy, access point policy, or AWS Organizations service control policy.