Search code examples
boto3amazon-sqs

How to get the dead letter queue for a given SQS queue using boto3?


Using boto3 resource, how can I get the DLQ for a particular SQS queue?

I thought it was dead_letter_source_queues, but the use case is reversed.


Solution

  • You would call get_queue_attributes and check the RedrivePolicy.deadLetterTargetArn value in the response.