Security in Queues

Who may do what with a queue (IAM), which calls are audited, and how API and SQS clients authenticate.

Last updated 18 November 2026View as Markdown

IAM actions

Every request, through the API, the CLI, the console or the SQS endpoint, is checked against your IAM policies. A queue's resource name is rn:ews:<region>:<organization id>:queue:queue/<queue name>, for example rn:ews:de1:<organization id>:queue:queue/my-queue.

ActionAccessWhat it allows
queue:ListQueuesReadList the queues of the organization and their message counts
queue:GetQueueAttributesReadRead the settings and message counts of a queue
queue:CreateQueueWriteCreate a queue
queue:SetQueueAttributesWrite · destructiveChange the settings of a queue, including its dead-letter queue
queue:DeleteQueueWrite · destructiveDelete a queue and every message in it
queue:PurgeQueueWrite · destructiveDelete every message in a queue, keeping the queue
queue:ListDeadLetterSourceQueuesReadList the queues that use a queue as their dead-letter queue
queue:StartMessageMoveTaskWriteRedrive a dead-letter queue: move its messages back to their source queues or to another queue (also needs SendMessage on the destination)
queue:ListMessageMoveTasksReadList the recent redrives out of a dead-letter queue
queue:SendMessageWritePut messages on a queue, singly or in batches
queue:ReceiveMessageWriteTake messages off a queue for processing (hides them while in flight)
queue:DeleteMessageWrite · destructiveDelete a message that has been processed
queue:ChangeMessageVisibilityWriteExtend or shorten how long a received message stays hidden

Generated from the service’s IAM descriptor. Sensitive reads hand over secret material or source code and are recorded in the audit log like writes; destructive writes delete, overwrite or revoke.

  • The message actions (queue:SendMessage, queue:ReceiveMessage, queue:DeleteMessage, queue:ChangeMessageVisibility) are writes: a receive hides a message from your other consumers. The preset QueueReadOnlyAccess can see queues and their counts, but not send, receive or delete.
  • A redrive needs queue:StartMessageMoveTask on the dead-letter queue and queue:SendMessage on every queue the messages go to.
  • The batch operations need the action of their single form.

A worker that only consumes my-queue through the API needs this policy (replace org-id with your organization id). A worker that uses an SQS client and looks the queue up with GetQueueUrl also needs queue:GetQueueAttributes.

{
  "Version": "2024-01-01",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["queue:ReceiveMessage", "queue:DeleteMessage", "queue:ChangeMessageVisibility"],
      "Resource": "rn:ews:de1:org-id:queue:queue/my-queue"
    }
  ]
}

Audit

Creating, changing, purging and deleting queues, and redrives, are recorded in the audit log like every other change. Sending, receiving, deleting and changing the visibility of messages are not recorded when they are allowed, as they happen thousands of times a minute; a denied attempt is recorded.

Authentication

  • API and CLI: an access key in the Authorization: EWS-ACCESS-KEY <key id>:<secret> header, or the CLI's sign-in. The console uses your session.
  • SQS endpoint: requests signed with Signature Version 4 with an access key from Identity, Access keys, a legacy Object Storage key (EWSS3…), or temporary credentials with their session token. See Use an SQS client.

Either way the key acts as its IAM user, and a key with a limit can do no more than its limit allows. Both surfaces see only the queues of the key's organization.

Did this page help you?