S3 bucket configuration requests removal of default encryption

Deleting an S3 default encryption configuration does not disable encryption for new uploads. Check that the required encryption method and key remain configured.

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 encryption to AES256 for SSE-S3 or aws:kms for SSE-KMS. If policy requires a specific key, supply encryption_key_id and 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.

References