Review S3 bucket default encryption policy

Check that S3 default encryption meets the organization’s algorithm and key-management requirements.

Description

S3 encrypts new uploads automatically. A new bucket without BucketEncryption uses S3-managed keys (SSE-S3) by default.

Potential impact

Uploads can remain encrypted yet fall outside a policy that requires a particular KMS key. Changing the default affects new uploads. Existing objects retain their current encryption.

Remediation

Set the required algorithm and key in BucketEncryption.ServerSideEncryptionConfiguration. For SSE-KMS, check uploader and reader permissions. If every upload must use a specific key, enforce it with a bucket policy. Check existing objects separately.

Examples

The second template uses aws:kms. Supply the ARN of an available symmetric customer-managed KMS key in the bucket’s Region as KmsKeyArn. After deploying, verify the key used on a new object.

Before

yaml
Resources:
  S3Bucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: !Sub 'bucket-${AWS::Region}-${AWS::AccountId}'

After

yaml
Parameters:
  KmsKeyArn:
    Type: String
Resources:
  S3Bucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: !Sub 'bucket-${AWS::Region}-${AWS::AccountId}'
      BucketEncryption:
        ServerSideEncryptionConfiguration:
          - ServerSideEncryptionByDefault:
              SSEAlgorithm: aws:kms
              KMSMasterKeyID: !Ref KmsKeyArn

References