More Info:
Amazon SQS queues should enforce Server-Side Encryption (SSE) to protect the contents of their messages. This way contents of your messages will be unavailable to unauthorized or anonymous users.Risk Level
HighAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- 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)
- 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 CSF
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- PCI
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To remediate the misconfiguration of an SQS Queue not enforcing server-side encryption in AWS using the AWS Management Console, follow these step-by-step instructions:
-
Sign in to the AWS Management Console:
- Go to https://aws.amazon.com and sign in to the AWS Management Console using your IAM credentials.
-
Navigate to the Amazon SQS service:
- From the AWS Management Console, search for “SQS” or find the “Simple Queue Service” under the “Messaging” section.
-
Select the SQS Queue requiring encryption:
- Click on the SQS Queue that needs to enforce server-side encryption.
-
Configure Server-Side Encryption:
- In the SQS Queue details page, click on the “Configure Queue” button.
-
Enable Server-Side Encryption:
- Under the “Server-side encryption” section, select the option to enable server-side encryption.
-
Choose Encryption Key:
- Choose the Customer Master Key (CMK) from AWS Key Management Service (KMS) that you want to use for encrypting the messages in the SQS Queue.
-
Save Changes:
- Click on the “Save Changes” button to apply the server-side encryption configuration to the SQS Queue.
-
Verify Encryption Configuration:
- To ensure that server-side encryption is enforced, you can check the SQS Queue settings to confirm that encryption is enabled.
Using CLI
Using CLI
To remediate the misconfiguration of SQS Queue not enforcing server-side encryption in AWS using AWS CLI, follow these steps:
- List all the existing SQS Queues to identify the one that needs to be remediated:
- Get the attributes of the specific SQS Queue that needs to enforce server-side encryption. Replace
queue-urlwith the URL of the SQS Queue:
- Enable server-side encryption on the SQS Queue. Replace
queue-urlwith the URL of the SQS Queue:
- Verify that server-side encryption is enabled on the SQS Queue by checking the attributes again:
Using Python
Using Python
To enforce server-side encryption for an AWS SQS queue using Python, you can follow these steps:Replace By following these steps, you can remediate the misconfiguration and enforce server-side encryption for an AWS SQS queue using Python.
- Import the necessary libraries:
- Initialize the SQS client:
- Get the URL of the SQS queue:
- Update the SQS queue attributes to enable server-side encryption:
YOUR_QUEUE_URL, YOUR_KMS_KEY_ID, YOUR_QUEUE_ARN, and YOUR_ACCOUNT_ID with your actual values.- Verify that the server-side encryption is enabled for the SQS queue:
Using Terraform
Using Terraform
THIS_QUEUEwith your Terraform local name.REPLACE_WITH_QUEUE_NAMEwith the actual SQS queue name.- For SSE-KMS, change
alias/aws/sqsif you want a customer-managed KMS key.
terraform plan, you should see:- either
sqs_managed_sse_enabledchanging fromfalse(ornull) totrue, - or
kms_master_key_idbeing added/updated (and possiblykms_data_key_reuse_period_seconds),
with the queue resource being updated in place, not recreated.

