More Info:
AWS S3 buckets should protect their sensitive data at rest by enforcing Server-Side Encryption (SSE).Risk Level
HighAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- AWS Well Architected Framework
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- DPDPA
- Digital Operational Resilience Act (EU)
- Essential 8
- GDPR
- HIPAA
- HITRUST CSF
- ISO 27001
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST
- NIST CSF
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- PCI
- Reserve Bank of India (RBI) Cyber Security Framework
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Sure, here are the step-by-step instructions to remediate the S3 Buckets Should Enforce Server Side Encryption misconfiguration in AWS using the AWS console:
- Login to your AWS Management Console.
- Navigate to the S3 service.
- Select the bucket that you want to remediate.
- Click on the “Properties” tab.
- Under the “Default encryption” section, click on the “Edit” button.
- Select “AES-256” or “AWS-KMS” as the encryption type.
- Click on the “Save” button.
- Repeat the above steps for all the S3 buckets that need to be remediated.
Using CLI
Using CLI
To remediate the misconfiguration “S3 Buckets Should Enforce Server Side Encryption” for AWS using AWS CLI, you can follow the below steps:Note: Replace Note: Replace
- Open the AWS CLI on your local machine.
- Run the following command to list all the S3 buckets in your AWS account:
- Identify the S3 bucket that needs to be remediated.
- Run the following command to enable server-side encryption on the identified bucket:
<bucket-name> with the name of the identified S3 bucket.- Once the command is executed successfully, the identified S3 bucket will enforce server-side encryption.
- To verify if the server-side encryption is enabled, run the following command:
<bucket-name> with the name of the identified S3 bucket.- If the server-side encryption is enabled, the output of the above command will show the encryption configuration for the S3 bucket.
Using Python
Using Python
To remediate the misconfiguration in AWS, you can use the AWS SDK for Python (Boto3) to enforce server-side encryption on all S3 buckets. Here are the steps to follow:
- Install Boto3 using pip:
- Create a Python script and import the required modules:
- Instantiate a Boto3 S3 client:
- Retrieve a list of all S3 buckets:
- For each bucket, check if server-side encryption is already enabled:
- Run the script to enable server-side encryption on all S3 buckets.
Using Terraform
Using Terraform
aws_s3_bucket_server_side_encryption_configuration updates the bucket in place; it does not force bucket replacement, but it will overwrite any existing default encryption configuration.To verify, terraform plan should show either:+ aws_s3_bucket_server_side_encryption_configuration.this_aes256withsse_algorithm: "AES256", or+ aws_s3_bucket_server_side_encryption_configuration.this_kmswithsse_algorithm: "aws:kms"and the CMK ARN,
and no-(destroy) for theaws_s3_bucket.thisresource.

