Description
Creating an SQS queue over HTTPS without encryption options selects SQS-managed encryption (SSE-SQS) for message bodies. If kms_master_key_id is absent, check the deployed queue’s encryption settings.
Potential impact
Disabling encryption leaves new message bodies unprotected at rest. If you must control the key policy, choose a customer managed KMS key.
Remediation
Check the queue attributes SqsManagedSseEnabled and KmsMasterKeyId. For SSE-KMS, set kms_master_key_id to a key in the queue’s Region and test sending and receiving with the producer and consumer permissions.
Examples
The second task selects alias/MyQueueKey and sets data key reuse to one hour. The visibility timeout is 120 seconds and message retention is one day.
Before
- name: SQS 큐 생성
community.aws.sqs_queue:
name: my-queue
region: ap-southeast-2
default_visibility_timeout: 120
message_retention_period: 86400
After
- name: SQS 큐 생성
community.aws.sqs_queue:
name: my-queue
region: ap-southeast-2
default_visibility_timeout: 120
message_retention_period: 86400
kms_master_key_id: alias/MyQueueKey
kms_data_key_reuse_period_seconds: 3600