Amazon Simple Queue Service (SQS) is a managed message queuing service for application-to-application (A2A) communication. Amazon SQS can store
messages encrypted as soon as they are received. In the case that adversaries gain physical access to the storage medium or otherwise leak a message
from the file system, for example through a vulnerability in the service, they are not able to access the data.
Ask Yourself Whether
- The queue contains sensitive data that could cause harm when leaked.
- There are compliance requirements for the service to store data encrypted.
There is a risk if you answered yes to any of those questions.
Recommended Secure Coding Practices
It’s recommended to encrypt SQS queues that contain sensitive information. Encryption and decryption are handled transparently by SQS, so no
further modifications to the application are necessary.
Sensitive Code Example
For AWS::SQS::Queue:
AWSTemplateFormatVersion: '2010-09-09'
Resources:
Queue:
Type: AWS::SQS::Queue
Properties:
DisplayName: "unencrypted_queue"
SqsManagedSseEnabled: false # Sensitive, encryption disabled
Compliant Solution
For AWS::SQS::Queue:
AWSTemplateFormatVersion: '2010-09-09'
Resources:
Queue:
Type: AWS::SQS::Queue
Properties:
DisplayName: "encrypted_queue"
SqsManagedSseEnabled: true
See