Lookup a queue by its name - AWS SQS

0 votes
Is it possible to lookup for a particular queue by its name? How? Can you please provide the boto code for it? Thanks in advance.
Aug 20, 2019 in AWS by Laksha
412 views

1 answer to this question.

0 votes

Yes, it is possible to lookup for a particular queue by its name.

# Get the service resource
sqs = boto3.resource('sqs')

# Get the queue. This returns an SQS.Queue instance
que = sqs.get_queue_by_name(QueueName='example')

# You can now access identifiers and attributes
print(que.url)
print(que.attributes.get('DelaySeconds'))
answered Aug 20, 2019 by Akaash

Related Questions In AWS

0 votes
1 answer
0 votes
1 answer

AWS SNS - How to get SNS topic by name?

If you know the topic already exists ...READ MORE

answered Sep 4, 2018 in AWS by Archana
• 4,150 points
1,190 views
+1 vote
2 answers

What is a dead letter queue in AWS?

SQS dead letter queue is provided by ...READ MORE

answered Jul 23 in AWS by Preeti
1,307 views
0 votes
1 answer

How do I delete a queue in AWS SQS?

Its pretty simple to delete a queue ...READ MORE

answered Aug 20, 2019 in AWS by Travis
206 views
0 votes
1 answer
0 votes
1 answer

Create a queue using boto - AWS SQS

Try this code: # Get the service resource sqs ...READ MORE

answered Aug 20, 2019 in AWS by Vishal
100 views
0 votes
1 answer

Access identifiers and attributes of a specific queue - AWS SQS

You can access the identifiers and attributes ...READ MORE

answered Aug 20, 2019 in AWS by Ganga
68 views