SQS Queue instance from resource API returns empty attributes #4109
Labels
bug
This issue is a confirmed bug.
p2
This is a standard priority issue
response-requested
Waiting on additional information or feedback.
sqs
Describe the bug
The change in the behavior has been introduced starting boto
1.34.90
Here is a demo code:
We are passing in Attributes when creating_queue, so that we can call
queue.attributes
down the line. I have tried similar approach using the client api (SQS.Client.get_queue_attributes
) as well, but the attributes are still not visible, regardless of specifyingAttributeNames
toall
.Expected Behavior
Up until version
1.34.89
, we were getting correct response forqueue.attributes
like the following:{'ApproximateNumberOfMessagesDelayed': '0', 'VisibilityTimeout': '90', 'ApproximateNumberOfMessagesNotVisible': '0', 'LastModifiedTimestamp': '1714509875', 'QueueArn': 'arn:aws:sqs:elasticmq:000000000000:dummy_queue', 'CreatedTimestamp': '1714509875', 'ApproximateNumberOfMessages': '0', 'ReceiveMessageWaitTimeSeconds': '20', 'DelaySeconds': '0'}
Now the response is just empty dict. Expected behavior is to have all the attributes like the previous versions.
Current Behavior
There is no error message, warning, or anything. Suddenly behaviors have changed to return an empty dictionary.
Reproduction Steps
On the latest version of boto3 and botocore (anything above 1.34.89 actually), run:
Possible Solution
Something might be happening with the visibility of the attributes. But I do not see a way to control this under resources api.
Additional Information/Context
No response
SDK version used
1.34.94
Environment details (OS name and version, etc.)
Ubuntu 20.04.6 LTS
The text was updated successfully, but these errors were encountered: