Reputation: 366
I received list of SQSQueue urls https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-list-all-queues.html
How can i receive queue name and messages available with current queue url?
Upvotes: 0
Views: 834
Reputation: 319
You can use getQueueAttributes() method, e.g., using js sdk (https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SQS.html#getQueueAttributes-property):
new AWS.SQS({region:<REGION>})
.getQueueAttributes({
QueueUrl:<QUEUE_URL>,
AttributeNames:['All']
})
.promise()
.then(data=>{
console.log(data)
})
Upvotes: 1