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
{{ message }}
Repository navigation
Bug: SQSRecord.queue_url uses amazonaws.com for queues in China and other partitions #8799
record.queue_url for a queue in cn-north-1 should be https://sqs.cn-north-1.amazonaws.com.cn/123456789012/my-queue.
Current Behaviour
It returns https://sqs.cn-north-1.amazonaws.com/123456789012/my-queue, which is not the SQS endpoint for the China partition, so using it with boto3 (delete_message, change_message_visibility, ...) fails. queue_url always uses amazonaws.com, so the same happens for the ISO partitions and aws-eusc. Commercial and GovCloud queues are fine.
queue_url already splits the ARN, so it can take the partition (arn_parts[1]) and use its DNS suffix (same values as botocore's partitions.json: aws-cn -> amazonaws.com.cn, aws-iso -> c2s.ic.gov, aws-iso-b -> sc2s.sgov.gov, etc.), defaulting to amazonaws.com. I have a small fix with a parametrized unit test ready and can open a PR once this is triaged.
Steps to Reproduce
Install Powertools (checked on develop at c3114b6).
Run the snippet above.
The printed URL uses amazonaws.com instead of amazonaws.com.cn.
Did you run the reproduction yourself?
Yes, I ran it and saw the failure. (I used an AI assistant while investigating this; I ran the snippet and checked the output myself. I don't have a China-region account, so I haven't tried the URL against a live queue; the expected domain is from botocore's partition data and the AWS China endpoint docs.)
Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link
powertools-for-aws-oss-automation commented on Nov 11, 2026
Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out our GitHub Discussions: Join the conversation
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either reopen the issue, or open a new issue referencing this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Activity
boring-cyborg commentedon Nov 11, 2026
Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link
powertools-for-aws-oss-automation commentedon Nov 11, 2026
Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out our GitHub Discussions: Join the conversation
fix(data_classes): resolve correct SQS queue URL for China and other …
powertools-for-aws-oss-automation commentedon Nov 15, 2026
Warning
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either reopen the issue, or open a new issue referencing this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.