Repository navigation
fix(data_classes): resolve correct SQS queue URL for China and other AWS partitions (#8799) - #8814
Conversation
…AWS partitions (aws-powertools#8799) Signed-off-by: dhairyakhandelwal880-dotcom <dhairyakhandelwal880@gmail.com>
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
…literal Signed-off-by: dhairyakhandelwal880-dotcom <dhairyakhandelwal880@gmail.com>
|
leandrodamascena
left a comment
There was a problem hiding this comment.
Thanks @dhairyakhandelwal880-dotcom, and welcome! I checked your suffix table against botocore's partitions.json and all eight match, including the ISO ones and aws-eusc. Unknown partitions keeping amazonaws.com is the right fallback. Goes out in 3.41.0, no need to rebase, you'll be in the release notes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8814 +/- ##
========================================
Coverage 97.17% 97.17%
========================================
Files 323 323
Lines 16606 16610 +4
Branches 1504 1504
========================================
+ Hits 16137 16141 +4
Misses 328 328
Partials 141 141 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ede7473
into
aws-powertools:develop
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |



Issue number: closes #8799
Summary
Changes
arn_parts[1]) inSQSRecord.queue_urlfromeventSourceARN.aws->amazonaws.com,aws-cn->amazonaws.com.cn,aws-iso->c2s.ic.gov,aws-iso-b->sc2s.sgov.gov,aws-iso-e->cloud.adc-e.uk,aws-iso-f->csp.hci.ic.gov,aws-eusc->amazonaws.eu), falling back toamazonaws.comfor unknown partitions.tests/unit/data_classes/required_dependencies/test_sqs_event.py.User experience
Before this change,
record.queue_urlfor a queue in China (e.g.arn:aws-cn:sqs:cn-north-1:123456789012:my-queue) returnedhttps://sqs.cn-north-1.amazonaws.com/123456789012/my-queue, which failed when used with boto3 SQS calls (delete_message, etc.) because the endpoint did not match the partition.After this change,
record.queue_urlcorrectly produceshttps://sqs.cn-north-1.amazonaws.com.cn/123456789012/my-queuefor China, and appropriate DNS suffixes for ISO and European Sovereign Cloud partitions.Verification
test_sqs_record_queue_url_partitionscoveringaws,aws-cn,aws-us-gov,aws-iso,aws-iso-b,aws-iso-e,aws-iso-f,aws-eusc, and custom partition fallbacks.tests/unit/data_classes/tests pass cleanly.ruff.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.