Description
Since January 5, 2023, S3 has automatically encrypted new uploads. Ansible's encryption: none requests removal of the bucket's configured default. S3 then uses S3-managed keys (SSE-S3).
Potential impact
If the bucket previously defaulted to SSE-KMS, uploads that rely on its default can lose the required KMS key controls. Existing objects keep their encryption settings.
Remediation
- Set
encryptiontoAES256for SSE-S3 oraws:kmsfor SSE-KMS. If policy requires a specific key, supplyencryption_key_idand grant uploaders and readers the required KMS permissions. - Check the deployed default and test an upload and download. An older module can report failure after S3 has applied the change.
- Check older objects individually. If any need encryption, copy them with the required settings, individually or with S3 Batch Operations. Review read access, public access and transport protection separately.
Examples
Use your bucket name and a module version that supports the current S3 encryption behavior.
Request removal of the default encryption configuration
yaml
- name: Create a simple s3 bucket
amazon.aws.s3_bucket:
name: mys3bucket
state: present
encryption: "none"
none resets the default to SSE-S3.
Request SSE-KMS default encryption
yaml
- name: Create a simple s3 bucket
amazon.aws.s3_bucket:
name: mys3bucket
state: present
encryption: aws:kms
aws:kms selects SSE-KMS. No customer-managed key is specified here.