Check ID: sqs_queues_not_publicly_accessible
Provider: AWS
Service: sqs
Severity: CRITICAL
Categories: internet-exposed
Resource type: AwsSqsQueue

What this check verifies

Amazon SQS queue policies are assessed for public access. The finding highlights queues with Allow statements using a wildcard Principal without restrictive conditions, compared to queues that only grant access to the owning account or explicitly trusted principals.

Risk

Public SQS access can expose message data (confidentiality), enable unauthorized send/receive or tampering (integrity), and allow purge/delete operations that disrupt processing (availability). It may also trigger unbounded message ingestion, causing cost spikes and consumer overload.

Recommendation

Apply least privilege on SQS resource policies:
  • Avoid Principal: *; grant access only to specific accounts, roles, or services
  • Add restrictive conditions to tightly scope access
  • Prefer private connectivity and defense-in-depth controls
  • Review policies and audit activity regularly to prevent drift

Remediation

aws sqs set-queue-attributes --queue-url <example_queue_url> --attributes Policy='{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"<example_account_id>"},"Action":"sqs:*","Resource":"<example_queue_arn>"}]}'

References

Where this check fires

This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable by Check ID = sqs_queues_not_publicly_accessible. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks