π‘οΈ AWS S3 Bucket is not encrypted with a KMS keyπ’
- Contextual name: π‘οΈ Bucket is not encrypted with a KMS keyπ’
- ID:
/ce/ca/aws/s3/bucket-encryption-with-kms - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicβ
- π§ prod.logic.yamlπ’
- π AWS S3 Bucket
- π AWS S3 Bucket - object.extracts.yaml
- π§ͺ test-data.json
Similar Policiesβ
Descriptionβ
Descriptionβ
This policy identifies AWS S3 Buckets that are not configured to use Server-Side Encryption with AWS Key Management Service (SSE-KMS or DSSE-KMS). Encrypting data at rest in S3 ensures protection against unauthorized access to the underlying storage infrastructure.
When storing data in Amazon S3, you can choose from several mutually exclusive server-side encryption options, depending on how you manage encryption keys and the level of control you require.
Server-Side Encryption with Amazon S3 Managed Keys (SSE-S3)
By default, all S3 buckets have encryption enabled using SSE-S3. Each object is encrypted with a unique key, which is itself encrypted with a root key that Amazon S3 rotates regularly. SSE-S3 uses 256-bit Advanced Encryption Standard (AES-256) for data protection.
Server-Side Encryption with AWS Key Management Service Keys (SSE-KMS)
SSE-KMS integrates Amazon S3 with AWS KMS, providing greater control over encryption keys. You can use AWS-managed keys or create and manage customer-managed keys (CMKs). SSE-KMS enables fine-grained access control, centralized key management, key rotation, and detailed key usage auditing through AWS CloudTrail.
... see more
Remediationβ
Remediationβ
Enable Server-Side Encryption with AWS KMS Keysβ
From Command Lineβ
To enable server-side encryption with AWS Key Management Service (SSE-KMS or DSSE-KMS) on an AWS S3 bucket, run the following command:
aws s3api put-bucket-encryption \
--bucket {{bucket-name}} \
--server-side-encryption-configuration '{
"Rules": [
{
"ApplyServerSideEncryptionByDefault": {
"SSEAlgorithm": "{{aws:kms | aws:kms:dsse}}",
"KMSMasterKeyID": "{{kms-key-arn}}"
},
"BucketKeyEnabled": true
}
]
}'This command enables KMS-based encryption for all new objects uploaded to the specified bucket.
Existing objects remain unencrypted. You can encrypt an unencrypted object to use SSE-KMS by copying the object back in place:
aws s3api copy-object
--bucket {{bucket-name}} \
--key {{object-key}} \
--body {{filepath}} \
--bucket {{bucket-name}} \
--key {{object-key}} \
--body {{filepath}} \
... [see more](remediation.md)