I needed this as my environment had some stringent restrictions on the IAM role that can access the queues: it only allows sqs:GetQueueAttributes on very specific queues (so no sqs:ListQueues nor sqs:GetQueueUrl).
Also has the added benefit of reducing the metric collection to a single call to SQS instead of 2 (because it doesn't have to retrieve the queues or look up their URLs).
I needed this as my environment had some stringent restrictions on the IAM role that can access the queues: it only allows
sqs:GetQueueAttributes
on very specific queues (so nosqs:ListQueues
norsqs:GetQueueUrl
).Also has the added benefit of reducing the metric collection to a single call to SQS instead of 2 (because it doesn't have to retrieve the queues or look up their URLs).
Perhaps, this might be useful to others.