You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to purge queues in multiple regions that have the same names, boto3 thinks they are the same queue and returns an error even though the URL is different.
Expected Behavior
Purge should be triggered on queues in both regions instead of returning an error.
Create queues in two regions with names 'pennies', 'nickels', 'dimes', and 'quarters'. Code that gets the exception:
if args.purge:
sqs = boto3.client('sqs')
try:
for region in ['us-east-1', 'us-west-2']:
for coin in ['pennies', 'nickels', 'dimes', 'quarters']:
url = f"https://sqs.{region}.amazonaws.com/*******/{coin}"
print(f"purging {url}")
sqs.purge_queue(QueueUrl=url)
time.sleep(60) # workaround for bug
except Exception as e:
print(e)
Possible Solution
Have boto3 internals check the entire QueueUrl parameter instead of just the name at the end.
Additional Information/Context
No response
SDK version used
1.33.2
Environment details (OS name and version, etc.)
Manjaro
The text was updated successfully, but these errors were encountered:
Update: well, nevermind, you can close this bug. It seems that boto is ignoring the 'url' and just invoking the queue by name. Here is resolved code:
if args.purge:
try:
for region in ['us-east-1', 'us-west-2']:
sqs = boto3.client('sqs', region_name=region)
for coin in ['pennies', 'nickels', 'dimes', 'quarters']:
url = f"https://sqs.{region}.amazonaws.com/*******/{coin}"
print(f"purging {url}")
sqs.purge_queue(QueueUrl=url)
except Exception as e:
print(e)
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
When attempting to purge queues in multiple regions that have the same names, boto3 thinks they are the same queue and returns an error even though the URL is different.
Expected Behavior
Purge should be triggered on queues in both regions instead of returning an error.
Current Behavior
print statements and exception:
purging https://sqs.us-east-1.amazonaws.com/*******/pennies
purging https://sqs.us-east-1.amazonaws.com/*******/nickels
purging https://sqs.us-east-1.amazonaws.com/*******/dimes
purging https://sqs.us-east-1.amazonaws.com/*******/quarters
purging https://sqs.us-west-2.amazonaws.com/*******/pennies
An error occurred (AWS.SimpleQueueService.PurgeQueueInProgress) when calling the PurgeQueue operation: Only one PurgeQueue operation on pennies is allowed every 60 seconds.
Reproduction Steps
Create queues in two regions with names 'pennies', 'nickels', 'dimes', and 'quarters'. Code that gets the exception:
Possible Solution
Have boto3 internals check the entire QueueUrl parameter instead of just the name at the end.
Additional Information/Context
No response
SDK version used
1.33.2
Environment details (OS name and version, etc.)
Manjaro
The text was updated successfully, but these errors were encountered: